Shame is a big part of Locke's disciplinary plan. Because the child is so keen on having his parents' approval, shame is very effective at preventing bad behavior. In order to make shame more effective, Locke suggests that parents not forbid any vices before the child has committed the crime. If you forbid the crime then the child will get the impression that the crime is natural and to be expected. Instead, parents should wait until the child has already done wrong and then react with utter horror and disbelief, as if it the child had done the strangest thing. This way, the child will be completely shamed, and very unlikely to ever transgress in a similar way again.
Using shame as a tool should not only replace beating, it should also replace yelling or strongly rebuking. Yelling, Locke claims, lessens the authority of the parents because children can tell that screaming comes from passion rather than reason and so they come to respect their parents less. In addition, when a parent yells, the child often gets the impression that the parent dislikes him and not just his particular fault. Finally, yelling is usually accompanied by bad language and so sets a poor example for the child. In place of yelling, Locke suggests a severe look, or a few grave, kind, sober words.
On the topic of discipline, Locke is careful to warn that parents not punish children for faults of their age rather than of their characters. Children are naturally loud, boisterous, a little wild and unruly. This is not a bad thing, and it is not anything that should be disciplined. As the child matures he will naturally outgrow these qualities, and while he is young they will serve his well by giving him vigor and energy for both play and study. A child, Locke declares, should be left as free and unrestrained as possible; in other words, a child should be allowed to act like a child.
Locke does make one exception to the rule against severe punishment. He allows beating in the case of obstinacy or rebellion; if the child rejects the parents' authority outright, then extreme measures must be taken. This is because obstinacy threatens the entire system of education. If the parents' authority is not respected (which is exactly what is happening in obstinacy) then virtue cannot be instilled. Locke warns, though, that the parent should distinguish between true obstinacy (in which the child really is rebelling against parental authority) and childish willfulness (in which the child is merely asserting his own claims to freedom, without truly challenging the supremacy of the parent).
If it does come to this (Locke thinks it generally will not) then the beating should be severe and unrelenting. The child should be beaten until his obstinacy is broken. This way, he will never have to be beaten again. In addition, the beating should be postponed until significantly after the infraction, so that there will be no passion mixed in with the punishment. It should be performed by the tutor, and not by a parent, so that the child does not develop negative associations with his parent.
Using esteem and disgrace as the child's motivation for good behavior raises an important question: if this is why the child is acting good, is he really being virtuous? Imagine I see a man drowning and run out to save him. You ask me why I did it and I tell you it was because I felt empathy for the man, and placed a great value on his life. You would certainly think I had performed a virtuous (and brave) act. Now imagine that when you ask me why I did it I say that I did it so that everyone would hold me in high esteem. Would you still think of my act as so virtuous? Locke claims that the prospect of reward and punishment is the only thing that will motivate a rational creature, but this seems to be a somewhat pessimistic view (and a view that many moral philosophers would disagree with heartily). We can certainly imagine a scenario of the first sort, where there seems to be no prospect reward and punishment involved in the motivation.
Locke's emphasis on the importance of shame in discipline seems relevant to this problem, though it does not dissolve the worry entirely. Shame is an internally focused emotion. We do not feel ashamed simply because others think ill of us. If others think ill of us we feel embarrassed. Embarrassment only turns to shame when we think ill of ourselves. As we saw in the last section, then, the importance that the child places on his parents' estimation of him, quickly develops into an equal or greater concern for how he estimates himself. The child begins to really care about whether or not he behaves well, not just for the sake of being thought well by others, but simply because he would not feel good about himself if he behaved badly.
If shame is the ultimate motivation on Locke's view (as it seems to be) then his concept of reward and punishment is very broad. The reward that motivates a virtuous person is the reward of a clear conscience, or perhaps the reward of feeling good about helping someone or some such thing. The punishment that motivates a virtuous person is the punishment of a tortured conscience. This is certainly a more plausible view than one which says that the virtuous person is motivated entirely by what other people think of him.
Still, this does not clear up the worry entirely. It also seems misleading to say that what motivates a virtuous person is the prospect of this sort of internal reward and punishment. It is much more appealing to say that when I jump in to save the drowning man, I am not doing it so that I can feel great about myself afterward. My real motivation is not this prospect of reward; my real motivation is my concern for the other human being. This question (i.e. about the importance of reward and punishment within morality) is a huge one in moral philosophy, and so it is impossible to say definitively whether Locke is right or wrong on the matter. Still, it is an important thing to think about when contemplating his theory.