Food thieving is a common problem, but tough to solve because it is self-rewarding. There is no point in punishing the dog once she’s gotten food. The punishment will only serve to create fear at this point, because the thieving has already been rewarded with food. If a dog snatches food that could endanger her, approach her in a friendly way with a favorite treat and offer it to her in exchange for dropping the stolen food. Then praise the dog when she does drop it and accepts your trade.
In general, if you don’t prevent the thieving from happening, the only thing you can do is ignore it after the fact– it’s frustrating, but refrain from yelling if the dog has already reinforced the behavior by getting food.
To stop it from continuing, you need to train some positive alternatives as well as catch her in the act a few times. Start by changing your own habits— avoid leaving food where she can reach it unattended. Eventually you’ll be able to relax again, but while she’s still learning, avoid tempting her. It’s not fair to set her up to misbehave. Set her up for success, and reward the success. That builds confidence.
Secondly, teach her to stay out of the way when you are cooking and eating, so that she won’t be near counters and tables to snatch food. Get a rug and a special chew treat that she really loves. She only gets the special chew if she’s been sent to her rug– so being sent to the rug is a reward, not a punishment. Start by rewarding her with a small treat for stepping on the rug, lying on it, interacting with it in any way. Clicker training is really helpful here. Once she’s got the idea, build up to longer and longer periods of lying on her rug chewing her special toy. After a couple weeks of daily practice, she should be able to lie quietly for 30 minutes until you give her a treat and release her— and even then she may choose to stay on the rug and chew her bone instead of wandering away!
Once your dog loves the rug and sees staying there as a pleasant thing, send her there every time you cook or sit down for a meal. If you do this consistently, she will begin to automatically head for her rug every time you start bustling around the kitchen. Make sure to reward her before releasing her every time.
The final thing that can help is to make a shake can (soda can with a few pennies in it) and hide out of her sight while leaving some food out on the counter. When she goes for it, make sure she doesn’t know where you are, and toss the shake can so it lands near her. Don’t throw it AT her, just toss it so it lands with a loud rattle and startles her. If you do it right, she will think some invisible deity made a frightening noise right when she reached for food to steal, and she’ll be discouraged from stealing in the future!