According to Super Cheats, there is no way to enter cheat codes in Pokémon FireRed without the use of an external device. Using a GameShark, however, there are many codes that can be entered. Simply insert the game cartridge into the GameShark, insert the GameShark into the GameBoy, and then enter the codes.
To unlock the extremely useful No Random Battles code, enter A202166EFF00 and 820255AC0000. This code allows players to roam the world map without any random encounters with wild Pokémon.
To obtain maximum cash in the game, enter 82025838104E and 8202583AE971. To obtain all of the Pokéballs in the game, enter the following four codes: 420259D80001, 0001000C0004, 420259DA5212 and 0000000C0004. To obtain all of the berries in the game, enter the following four codes: 42025AF40085, 0001002B0004, 42025AF65212 and 0000002B0004.
Entering these two codes allows the bike to be ridden over water: 72036E3C0100 and 32036E430000. This is an interesting code for players who want to fully explore the game world without the aid of aquatic Pokémon.
Other codes manipulate specific sections of the game data. To reset the in-game clock, for example, enter the codes 420246120000 and 000000020002. Similarly, entering the code 320246160000 stops the in-game timer entirely.
GameShark can corrupt saved files, so the codes should be used with caution.