Sunset Shimmer

Sunset Shimmer is a unicorn from Equestria who serves as the main antagonist of My Little Pony FiM: Equestria Girls. In the movie, she is portrayed as an old student of Princess Celestia who quit because of not getting what she wanted, and discovered a magic mirror which took her to a human world where she planned to take over Equestria. She steals Twilight's crown and takes it to the human world where it is used to be a crown for a Fall Formal of a High School, which Twilight tries to win. Sunset tries everything she can do to stop her, but each one gets foiled. She is luckily defeated, and Twilight decides that her friends' human counterparts befriend her and show her the magic of friendship.

MLP Equestria Girls
Sunset Shimmer appears as the main antagonist in My Little Pony Equestria Girls. She steals Twilight Sparkle's element of magic crown, and during a tussle with Twilight, the crown is thrown into a mirror which acts as a portal to another world. Sunset then follows the crown shortly after. Princess Celestia reveals that Sunset was a former student of hers who began her studies not long before Twilight did. However, when she didn't get what she desired as quickly as she'd liked, she turned cruel and dishonest, eventually abandoning her studies to pursue her own path. In this other world, Sunset has been living as a human and student of Canterlot High for some time. She discovers that Fluttershy had found the crown and turned it over to Principal Celestia, much to Sunset's annoyance.

Upon learning that Twilight will be competing against her for the title of Princess of the Fall Formal, Sunset employs various ways to hinder and humiliate Twilight, such as having Snips and Snails record embarrassing videos of her struggling to get used to the human world and releasing the videos online, and doctoring photos to frame Twilight for ruining the dance decorations. But Twilight's friends help to counter these ploys by improving Twilight's reputation and Flash Sentry, Sunset's ex-boyfriend, helps prove Twilight's innocence.

At the Fall Formal, when Twilight is named Princess and given the crown, Sunset has Snips and Snails kidnap Spike and threatens to destroy the portal to Equestria unless Twilight gives her the crown. Twilight refuses to give the crown up, stating that her being stuck in the human world would be worth stopping Sunset. As Twilight's friends commend her bravery and sacrifice, Sunset snaps and attacks her. Despite Twilight and her friends' efforts, Sunset succeeds in getting the crown and puts it on, transforming into a demonic creature. With her newfound powers, Sunset transforms Snips and Snails into similar-looking minions and brainwashes the other students at the school. She reveals that she never intended to destroy the portal and plans to invade and conquer Equestria with her army of teenagers.

Twilight is able to evoke the powers of the Elements of Harmony when her friends move to protect her from Sunset Shimmer's attack. Temporarily given pony-like characteristics, they use the magic of friendship to defeat Sunset Shimmer and return Snips, Snails, and the rest of the students to normal.

As everyone recovers, a beaten and repentant Sunset is reduced to tears and apologizes to everyone she's hurt. She admits to not knowing anything about friendship, to which Twilight says her friends can teach her. Sunset, Snips, and Snails are later tasked by Vice Principal Luna with rebuilding the part of school they had destroyed during their attack.

Role in the Series
After Scroopfan had been doubtful of having Equestria Girls being mentioned in the series, he finally allows Sunset to have a first appearance in The Tallest Talltales EVAH! where Twilight depicts her in the last story once again as an antagonist who reforms in the end. But she also makes an appearance in Reverse of Fortune, where in the alternate reality, she takes Twilight's place and ends villainy in the UUniverses and becomes the supreme Emperor. But she discovers what happened, and fixes everything herself. She not only regains her old memories, but she retains her memories of the reality, learning of Twilight's outside life. In the series, it is revealed that after Sunset was defeated in Equestria Girls, she was forgiven and celebrated for having a change of heart, and not only was she made the new Princess of the Fall Formal, but she also got back together with Human Flash Sentry a few weeks later. Regardless, she is still reformed and kind-hearted.