Instructions
Buy a used GameShark for the Game Boy Advance online. Because the GameShark GBA is a legacy device, retail stores like GameStop don't stock it any more. You will probably be able to buy a used GameShark GBA for $50 to $120.
Make sure your Game Boy Advance is off. Place the GameShark into the bottom cartridge slot of the GBA. Insert "Pokemon Sapphire" into the GameShark. Turn the GameShark GBA on using its power-on switch.
Turn on your GBA and the GameShark will take you to a list of cheats for "Pokemon Sapphire." Highlight "Add New Cheat" with the D-pad of your Game Boy Advance, then press "B" and enter "Walk Through Walls as a Ghost" as the description of the cheat.
Use the "Start" button to confirm the cheat description. Enter the following code using the D-pad: CE2CCCB2 5D8D815D. Press "Start" to finalize the cheat code. Press "Select" to reenter the code if you made a mistake.
Wait for "Pokemon Sapphire" to start. After you enter a new code, the GameShark will start the game to commit the cheat to memory. You can now walk through most walls and objects in "Pokemon Sapphire."