Before you take shower in front of people, take some deep breaths and just do not think about that and take it easy. Keep in mind that if you are conscious, you will be noticed more by people. Therefore, instead of focussing on how people will think, just get about your business.
If you are taking a shower in front of people of the same gender, just remember that everyone has the same parts and they know how it feels to be naked in front of others.
Imagine yourself to be at home
Concentrate on what you are doing and imagine yourself to be in your personal bathroom, showering in privacy. However, even if this trick does not work out properly, then the best thing for you to do would be to talk to the person next to you. A general discussion for about five minutes will help immensely.
There is nothing sexual about showering with others
Keep in mind that people take shower to clean them and there is nothing sexual about it. You are not in the shower to show off your body or gawk at others.