You can do either. You may choose a pokemon to give them to, or donate them to the box, in which case they'll be given to the first pokemon we find who can use them.