I've got no kids and have no idea how to deal with kids, but...
Kids are little people (autistic or not). They have reasons for what they do that seem good to them. Those reasons may not make any sense to adults, but they ARE reasons.
With kids who are too young to have a sensible discussion about "why do you do that thing", it might be useful to look for common patterns. (Is it all shops? Or just big ones? Is it all the time, or just when it's busy? Is it just shops, or is it all public environments?) Maybe make notes and comparisons?
Kids are also learning how to be independent entities. Apparently the "terrible twos" is the point at which kids realise that they are people and they can make decisions and choose actions. Some of the acting up is them figuring out "what happens if I do this?" and "How far can I go?" Probably that lasts for a few years. This is obviously extremely frustrating for parents - possibly all the more when you try to explain in kid-friendly terms why we do not touch the hot things and they do it anyway. ("Hm, mum says it's hot, but is it really? What would REALLY happen if I touched it?")
Then you get into the age where they've got the whole autonomy thing figured out and they resent the fact that other people (parents) A) Have more of it than them, and B) Have the power to reduce their own autonomy. Cue the door-slamming years.
When it comes to autistic kids, there are a whole new set of things to think about. Not only might they have sensory issues (too loud, too quiet, too bright, too dim...) but they don't process social rules the same way. So not only might they experience a supermarket differently (ALL THE COLOURS! THE NOISE! THE PEOPLE MOVING ABOUT! - all of which might be cool and exciting to be explored, or terrifying), but they might have more trouble getting the hang of "how we behave in a supermarket" just by observing other people.
My non-autistic husband used to "throw tantrums" in places with high roofs when he was a child. Obviously that got him into trouble with his mother. It was only much later he was able to explain that high-roofed buildings give him an awful, vertiginous feeling as if he's falling towards the ceiling. Even as an adult, there are buildings he physically can't go into. So what LOOKED like bad behaviour was actually a totally logical response to the way he experienced that environment.
Then, of course, if you've explained the rules, remembering them is a different thing. A lot of autistic people have problems with short-term "working" memory. Or distractibility.
One thing that potentially might be interesting is to read articles/books written by autistic adults. A lot of the older stuff written about autistic kids was written when autism was seen as only a childhood problem. Now the range of autism diagnosis is wider, and diagnosed people are getting older, there's more written by autistic people explaining autism from the inside. I think maybe things might be moving away from, "They do X because they're autistic, and we need to make them stop" towards, "Because they are autistic, they experience A or B in a different way, and react to it by doing X. If X is not a healthy/appropriate behaviour, we need to consider how to modulate the experience of A or B so they don't feel the need to do X."
But parenting is hard. It's even harder in modern, particularly Western societies, where it's done almost all by the parents alone. Not only does it mean that parents (particularly first-timers) are on their own with this THING that keeps doing weird stuff and DID NOT COME WITH A MANUAL, but they may not have anyone to just hand it over to so they can have a rest (like handing over your Tamagotchi to the school secretary), let alone get a second opinion ("Does yours do this? Is this normal? Can you have a go and see if you can make it stop?").
Also, it's not done to admit that it's hard (or even so hard that you sometimes wonder whether it was a good idea at all), so you may get the impression you are the only one who finds it so.