You mean because you are not able to communicate with the foreigner in their own language?or are you xenophobic in general?
I assume that you feel somehow embarassed because you can't speak fluently with the person.
To overcome this you have to boost your self-confidence.There is nothing wrong about not being fluent in a language you are learning, feel proud that you are trying to learn a new language.
If you are unable to find the right words ask the person to help you out,just express it neatly saying for example " I don't know how to say that in English." ,"Excuse me my English is not that good." etc.
You don't have to feel ashamed or afraid at all, on the contrary seize the opportunity to speak with a native speaker of the language you are learning ,it should be a fun experience.
Try to mingle more often with foreigners in order to break those psychological barriers and it will become very normal to you to be at ease around people speaking a language other than your native tongue.
Travel, if possibly to a foreign speaking country to live the experience of surrounding yourself with a totally different culture ,where you will get used to the idea of having to confront foreign people and be in situations where you inevitably have to communicate with them.That will give you a great experience of how to deal with a foreign culture as a whole, not only with different language speakers.