You cannot enter GameShark codes directly on a PSone console. GameShark is a physical hardware device that plugs into the PSone's memory card slot, allowing you to input cheat codes that modify gameplay.
Remember that using cheats can diminish the intended gameplay experience. Consider using them sparingly, only if you are genuinely stuck.