From your post it's hard to work out if the reason you were shouted at was due to a work issue, or someone being rude?
If it's the later just ignore it, don't let them get your back up; if it's a work issue ask them to explain carmly what was wrong as shouting doesn't solve the problem...