Never seen a ps2 game shark. As I said pec is a program cheater designed exclusively for any psx emulator (adripsx, epsxe etc.).
As for the game shark code part I think so, but since all the codes I used so far are pre-built ones I can´t be sure. I tried using game shark codes from a webpage link suplied with the program. They didn´t work but I guess the links were there for reason, they must be appliable, can be just for learning or understanding of codes though.