Hi H.,
I have a little girl that will be 2 next month. I'm going through the same thing. The one thing I've found to be very helpful when taking her to stores or restaurants is talking to her either in the car or before we enter the store. If we are going to Target or something, I explain that if she is good and lets mommy do her shopping, then she gets to go look at the toys (there is no buying or promises to buy anything - just looking). 99% of the time, this works like a charm because she remembers that if she starts acting up, I remind her that she needs to be a good girl and be patient - then she gets to have her reward of looking at toys. Also, I almost always put her in a cart or bring her in a stroller - it definitely makes a difference. It may take a few extra minutes, but it's worth being able to keep track of her and not have her throw herself on the floor when I'm shopping.
In the restaurant, I always make sure I'm loaded with things for her to do. This works most of the time. When it doesn't, either I or my husband will take her outside and have a talk with her. It's amazing what that can do. Granted, it doesn't always work and there have been times that we've just had to leave. But - it helps.
Patience is key. There have been many times when I find myself counting to 10 in my head. Just breathe! :) and don't worry about what other people think. Good luck to you!