GameShark does not work on the PlayStation Classic (PS1 Mini) in its stock form.
Caution: Hacking voids warranty (irrelevant now), can brick if power fails. Follow guides exactly. Backup stock kernel first.
Stock Mini: no cheats. Hacked Mini: RetroArch cheat support = GameShark codes work.