>>56431580If you have a 3DS, see
https://3ds.hacks.guide/ and mod it. It's super easy, and because Nintendo sucked at implementing anti-piracy stuff properly, an installed pirated game on a modded system is identical to a legit eShop one. The only difference is the signature on a ticket file, but the modding changes the system call that checks if it's valid to always say yes. So long as you don't install mods in the game and don't use cheats or save editors, all the Pokemon you get in it are entirely legit. They can also be transferred to Home using a pirate-installed copy of Bank. Pokemon from gen 5 ROMs can also be transferred into Bank using PokeTransporter if you use the DreamRadarCartRedirect patch, though it's usually simpler to just pick them up from the lower gen game using PKSM, drop them into a gen 6-7 game, and then bring them into Bank without Transporter.
If you don't have a 3DS, obviously emulation is the only answer. You can run it on a PC or phone, and the graphics will look better than on an actual 3DS because it can render at a higher resolution. The Pokemon in the game will still be legit unless you mod the game or cheat. But there's no real way to transfer them into Bank or Home without first moving your save into a real 3DS.