Having not been needed in the human world for quite sometime, and driven by her curiosity fueled by visiting the alternate timelines Starlight attempted to strand her and Spike in, Twilight began experimenting with various power sources to document their effects.
For the most part, nothing changed, the mirror either refused to function, or just ended up leading to the human world.
Until one day, while setting up for another attempt, Spike trips and tumbles into the portal, carrying a magical device that allowed her to remotely view where the portal would have ended up.
Triggering the device, noting that Spike had landed in a large clearing she didn't recognise, Twilight gathers her things to mount a rescue for her assistant…