While I don't think your question is for real, it's still a good question. So I'll give a serious answer.
Making a child go back to the store and give back the gum is plenty of discipline for most 5yo kids. The embarrassment and demands of obedience are pretty intense at that age. Allowing him to experience the consequences of his act will have made an impression.
Parents should, however, tell him what additional consequences he'll receive if he ever does this again. Possibilities might include restitution, perhaps by doing additional chores to earn money to pay the value of the stolen item. Writing a note of apology is also a good idea, but I'd let the child decide when he's genuinely sorry. Forcing them to say so when they are not is essentially requiring that they tell a lie.
It may also be time to start working with the child on using money well. If he has no "income" from allowance or household chores, he can't very well buy his own gum. He may be ready to accept responsibility for handling money.
My daughter began getting a small allowance at about age 5, and she was allowed to spend half of it on (an acceptable list of) treats or toys for herself or gifts for others, and I required her so save the other half. She could spend it only on "important" purchases, and only with my approval. She learned good saving habits this way. Some parents also include a requirement that some portion of it be used for charitable giving or tithing.