(spoilers)
This was certainly an interesting episode.
I actually noticed quite a few callbacks to the Season 1 episode "Griffon the Brush-Off". Both Rainbow Dash and Pinkie Pie enjoy pranks, but Pinkie is actually smart enough to know that it's not nice to pull certain pranks on certain ponies (such as any prank on Fluttershy). Also, one of Rainbow Dash's pranks resulted in Spike unknowingly sending a ton of letters to Princess Celestia.
Anyway, after a prank against Fluttershy, Rainbow's friends start by politely asking her to not do that again, but she takes the message the wrong way and starts pulling tons of pranks on everyone, making things even worse. So next they ask Pinkie Pie to talk some sense into her, but Rainbow Dash refuses to listen. With words not working, everyone in town has no choice but to take action, and thanks to Pinkie Pie's brilliant idea, it achieves the desired result. Rainbow Dash learns that while pranks can be funny, it's not okay to do them to those who won't enjoy them.
I also liked Rainbow Dash's final prank of the episode, claiming that she'll need to think of an even more epic prank to get back at the whole town, only to admit she's just kidding when they think for a moment she hadn't learned her lesson.
(end spoilers)