This all depends on how you want to handle the situation. However, it is important to know your legal rights.
Babies need to eat when they get hungry, and this includes breastfeeding! If this situation has happened to you, it can be helpful to know the laws in your state. The National Conference of State Legislatures has a wonderful information page regarding those laws. Forty-five states have laws that specifically allow breastfeeding in public, while 28 exempt nursing moms from public indecency laws. This page lists states alphabetically so you can see what is happening where you live.
How you handle this situation is a personal matter. You may want to make the establishment aware of your legal rights via a phone call or letter to someone in a management position. This can be helpful to educate them and also to help protect future breastfeeding mothers. As an alternative or in addition to this, some women voice their disapproval by avoiding shopping at stores that have done this to them (and have engaged social media to spread awareness about the situation). Still others have contacted local news outlets to bring attention to this type of treatment.
However you handle it, it is important to know that you were tending to the needs of your baby, and you should not feel guilty for that. In fact, it is only in recent history that “nursing in public” has become such a hot button issue. Before that, it was just nursing.