Select a volunteer who you can rely on to be receptive to your instructions. Do not pick anybody who is obviously immature, obviously drunk or who may react negatively to being tricked. Your ideal volunteer should be reasonably intelligent, with a sense of fun and a willingness to play along.
Prepare your volunteer for the trick. While the object of magic is to entertain, it is essential that your volunteer take the trick seriously. The best way for you to do this is for you to take the trick seriously yourself. Warn your volunteer that the trick will only work if he follows directions. Also, try and frame the trick as a collaborative endeavor. You and your volunteer are going to work together to make the trick work.
Treat your volunteer with respect at all times. In order to give mentalism tricks the best chance of succeeding, you must have a rapport with your volunteer. If you make fun of them, especially if you're performing in front of an audience, you encourage them to disobey your instructions in order to make you look foolish.
Ask your volunteer to think of a vegetable. John Thompson, in his book "Naked Mentalism," cites a study which shows that 98 percent of volunteers posed this question will immediately think of either a carrot, lettuce or tomato.
Discount tomato as a possible answer by saying "I should mention a tomato is a fruit, not a vegetable." If your volunteer has chosen a tomato, he will react and you can claim victory. If your volunteer does not react, you can assume with a large degree of certainty that he is thinking of a carrot or lettuce.
Discount lettuce as a possible answer by saying "You're not thinking of a green vegetable, are you?" This specific phrasing is important. If your volunteer says "Yes," then you can guess lettuce with a high degree of confidence. If he says "No," you can say "No, I didn't think you were. I nearly said lettuce, but then thought better of it." Now you can guess that he is thinking of a carrot with 98 percent certainty.