'I got shocked' isn't natural English. We probably wouldn't say this.
'I got electrocuted' is natural English, but it describes a very serious, or possibly fatal, incident involving an enormous amount of current entering your body.
In most cases, to describe the momentary pain of touching a faulty device or live wire, you'd say 'I got an electrical shock'.