I have the same problem,
I have always refused food in front of my friends during highschool, mostly junk food, I am embarrassed to eat it. During college I developed an eating disorder and became anorexic/bulimic for 2 years. So now the problem is even worse. I used to have panic attacks when I had to eat in front of people, even dinner at my boyfriend's house, (at that time it was because I usually ate NOTHING). But now I have gotten over my eating disorder and I still have a lot of problems eating in front of people. I try to eat alone, and when I'm alone sometimes I binge (especially after I refused food at a party in front of people). I also have a lot of anxiety ordering food at restaurants, fast food places, even buying groceries, I can't go anywhere involving food alone. If I go to the grocery store alone I start shaking and think everyone is looking at me.
I am getting better since getting over the eating disorder but I still never feel relaxed eating with other people, I get really self-conscious and I always get so nervous that I end up getting a huge stomach ache.
I think that all of us who have this problem, need to be careful, because it could easily develop into an eating disorder, and believe me, once it does, you will never be the same person. Food will never be the same for you, and your anxiety will just get worse. So try to monitor yourself, accept a little food from people, instead of saying no (this way they won't think it's strange), try to eat in the most relaxed atmosphere possible, but if you are too upset just don't eat, you won't even enjoy it and will probably end up with an upset stomach. Mostly my best advice is not to avoid food, the more you are around it the more you will get used to it. Eat with close friends/family, anyone you are comfortable with, and make it a fun thing but don't focus on the food the most, think about the people you are with and their company.