A situation where this often occurs is in the classroom. Children who act up in class want attention from the teacher. So when the teacher turns around to tell them off for acting up, even though they may think the child is being punished by being told off in front of the class, the child behaviour is being reinforced as he is getting what he wants - attention. Therefore the next time they want attention they will just act up again.
In this certain situation, one way to avoid reinforcing the child is to utterly and completely ignore the child, completely forget he exists. Then after the class when all the children have left, punish him by making him lose some of his lunch time, assign extra homework, or send him to speak with a higher teacher, etc
This should discourage the bad behaviour in class