I put a shopping basket down at the checkout and apologetically asked the cashier if staff could return the items because my kid was throwing a tantrum and was warned we'd get nothing at all. It never happened again.
Actions have consequences. If a kid expects a treat but misbehaves, yet the puppy is good, the consequence is that the good boy gets the treat and the bad boy doesn't.
We have all been consistent with not rewarding bad behavior. Our dog is too fat and old to do that with. Plus he feeds her every time he eats. Partners in crime. She steals his treats lol