Awesome. Use the same code if you end up getting yourself trapped in a Gym, like the Seanport one, because of a thought error in the design. I'm thinking script additions should be made to unlock all doors behind from the computers further ahead; normally you never see this, but for people saving inside, it makes sense!
I'll answer how to use Gameshark. You using VBA? If not, copy your save and the ROM over to it, because that's the most common emulator and maybe best to use. Then enter the code CE2CCCB25D8D815D. Where? Go to "Cheats -> Gameshark".
Complete that, walk into the trees on the right and go south back across, returning to the dock entrance. From here, ignore the fact you have the cheat turned on (this may be tempting to use in the Gym and you might have to since boxes to be pushed around might get walked through), then later return to the lake. Don't spend another 600 bucks. Just hop through the trees again retracing your steps, coming out where you were.
You can technically walk through into Bramboch Town (and even to Route 408) by staying in the trees; however, I do not recommend doing this. Instead, head into the town using the normal path. If you want, check out the weird tree on the left side of 407 in the forest. In town, ignore the missing section of fence (this has been restored) and head down the path. You should commence a rival battle.
At this point, when you save and quit, you'll be able to quit and come back in with the cheat turned off next time you play, or copy your save back to the original emulator if you don't use VBA.