In truth, she learned the lesson from Manehattan. Also, I know there is a "time error" (since the scene from Manehattan actually come before her Canterlot boutique), but Rarity got helps from Dr. Whooves.