She is experimenting. She didn't dump the shampoo to be bad, but because she is learning about how shampoo comes out of the bottle. Sometimes it's hard as a parent to recognize the difference.
I had a 2 year old sitting behind me at church on Sunday. She kept pulling all the hymnals out of the racks and stacking them on the seat and then putting them back in the racks. That action is textbook developmental play. I leaned over and told her what a good job she was doing. You should have seen her beam. Sometimes we need to understand what is happening from their perspective.
If my daughter had dumped the shampoo, we would have scraped it up into a bowl, and put it back into the bottle. I then would have explained to her that I would let her squeeze it out next time she took a bath. Redirection and encouragement often works far far better than making this a "you're in trouble" kind of thing.
BTW my wife has a degree in early childhood education. That is the ONLY reason I know about this kind of stuff.