I'm a proponent of the Ross Greene approach to to parenting (and teaching, disciplining, etc). If you're not familiar with Dr. Greene, one of his core arguments is that the behaviors we want to see from kids are skills that needs to be taught and practiced. Scolding or punishing a child do nothing to help him or her learn the skill they are lacking.
I titled this post How to Teach your Kids not to Beg but in the Ross Greene way of thinking, an alternate (but wordier) title would be How to Teach your kids the skill of seeing something they want and walking away from it.
Humans (big and small) do not learn new skills well while under emotional stress. Our brains simply do not take in new information when we're angry, scared, tired, etc. Trying to teach a skill to a child during a tantrum is all but certain to fail. Instead, you need to intentionally practice the skill when the child's brain is in a ready-to-learn mode.
With my children, we do lots of practice walking through toy aisles and not buying anything. Whenever we go to Target I tell my kids, "we can look at toys, but we will not be buying anything." Almost every time we go shopping, we spend 5-10 minutes looking at toys and not buying them. This process gives my kids practice walking away from things they really want.
This practice has paid off over and over. My six year old has been saving money for a new bike for months, but was willing to go to the bike shop, look at bikes, and walk away empty handed multiple times.
If you're interested in our bike purchase story, check out the video below!