Is this related to wanting to get a toy? I would tell my boys before going into the store that this was not a trip to get toys and keep it up until they agreed - or telling them if they got through two trips to the store, they would be able to pick something little (stick to your guns for just one toy) at the dollar store if they behaved - and only if they behaved. I had to constantly remind them that this was a trip ONLY for food or whatever I needed. I would tell them my rationale, such as we can't afford it until payday, but NEXT time . . .
If it just a fit in general, tell her that is not how to behave and give a warning that you both will have to leave the store and get nothing, which would mean she couldn't earn a toy, so tell her she has to make a choice - behave and get rewarded NEXT time, or to go to the dollar store later; or you will have to leave the store NOW. I sucks, because you may have to forgo something, or carry a crying child out the door. But everywhere you go - there are usually sympathetic moms who will just commiserate with you. I don't agree with the giving in more than 35% or the time, because the realize that they have control, not you, if they kick up a mess. For that age, though, it would be a gradual weaning off. But when it works, tell her what a big girl she is, and that it helped you soo much that she behaved, and reinforce that she can pick out a small toy on such and such a day (or later that day). Just be firm and let her know you are willing to walk out without whatever you came to get - but you are in charge. It will take a few times until you are taken seriously, but over time this will get easier.
Hang tough - just be patient and firm.