It's inappropriate to expect her to internalize a sophisticated sense of right and wrong at this age. She's not neurologically hard-wired to do that now. Instead of telling her "no" or spanking her, remove her from the situation and present her with an alternative activity or distraction. Then calmly explain to her that the behavior was inappropriate. She'll begin to get this message without being blamed for "being a kid." Make sure you remember to offer her lots of encouraging words for her good choices. Always try to be more positive than negative. Positive Discipline: The First Three Years by Nelsen, Erwin, and Duffy is an excellent resource for you.
Toddler and Teenager Expert Advice from Carleton Kendrick, Ed.M., LCSW