See if you can find someplace local that is having Love and Logic parenting classes. They teach you how to address things like this.
I give my little one a swat when this happens but his has advanced from simple running off inside the store. To where one time when we were getting out of our vehicle he took off, ran through the gate behind our house that goes into the back (truck/semi's) area of Walmart, ran all the way to the front of the store, went inside to visit with the door greeter people who I had just called on my cell phone to yell I had a 3 year old on the loose and to please restrain him, he took off when they tried to get him to stop, and when I finally got around the block driving to try and catch him I pulled right in front of him as he tried to get on the busy street in front of Walmart where there are several deaths a year because it is a very dangerous intersection.
Even though it was funny to see all those older door greeters and Walmart managers running around chasing a 3 year old...his life was in serious danger.
Love and Logic teaches that kids need to learn to be responsible and learn to make choices. One of the sessions addresses not stopping when asked or going to where asked.
In Walmart he is given the choice "Do you want to sit in this part of the basket or the top in the little seat?". He chooses the large area in the basket. When he stands or gets on his knees he is moved immed. to the seat area and buckled in. Screaming, kicking, etc...he gets moved. The next time we go ame thing. He will sit down more and eventually sit all the time in the area he chooses.
One of the teachings says that the next time you are going somewhere you act as if everything is normal by saying "I am going to...(where ever)" but when it is time for the litte one to go out the door you say "I have some sad/bad news sweetie, you know when you ran off at the bowling alley? Well, since you can't stop when I ask you too I afraid I am not taking you with me this time". Then don't take them. Leave them with the worst babysitter possible so they will hate staying at home...not a careless babysitter but one that doesn't make staying at home fun. Someone who only lets them play in their room and maybe not outside or something like that.
We have used this and it really works. Our older girl sometimes acted out in the store and I had a plan ready where if she did something not allowed I would take her to the door and my hubby would take her to the car. One time I finally had enough of the "I want this/I want that" and I told her she was going to the car and I literally had to drag her from theTV area up the isles, pulling her hands off racks of clothes, through the check out area, the whole gamit of temper tandrum behaviors...one time. She has never run off from me one time since. And when I ask her if she wants to go to the car, for instance if she is whining about wanting a toy, because she is not helping the shopping time to be fun, she will immed. stop the behavior and start doing what I have asked.
Love and Logis is very good for teaching us how to turn the behavior on to the child and them understanding how they need to act differently. It works on kids and grownups alike. It even works on husbands.
Some of our elementary schools offer the classes once a semester, local mental health facilities offer them for people needing to learn better parenting skills, local social services offer them to parents whose children may be in foster care, those would of course be confidential classes but they may know of some in the community, or just call around to local youth shelters or organizations. Someone may even be able to tell you something about starting a class at the website too.
http://www.loveandlogic.com/