I always do things the slow way, while there are other methods, this one has worked best for me.
Make sure you have lots of time,,,,Sit in the pasture and read a book. Sooner or later when the reading gets good, you'll have a donkey muzzle in the middle of it.
Itch his nose, then ignore him,, when he does it again, itch a little farther up his neck,, pretty soon you should be able to get a rope around his neck. Itch, give treats and say good boy!!