Thankfully I haven't had too much problems with the tantrums in public, just at home. If my kids do act up in a store and start screaming and crying I take them out of the store, sit and the car, explain the situation and wait until they are ready to try again. Thankfully, when I had to do this with my daughter it was before picking up any groceries. When she was ready to go back in the store she was fine. It's an inconvenience to me but she learned. She's now almost 4 and I can't think of a time after that. Try removing them and leave it up to them if they want to go back in. If not then try it another day or later in the day.
I'm still throwing tantrums!