Are you asking or telling us you are getting a shock (treatment because you have) an irregular heart beat?
I have undergone a procedure I have been told is called an electrocardioversion to stop my atrial fibrillation (Irregular HB). In this I was put under (asleep) and my heart was stopped and restarted using electric shock (two paddles were used to apply an electric current into and out of my chest). This caused my heart to return to normal sinus rhythm, the goal. This may be the treatment you are referring to, but I am not sure that is your question.
What type of electrical shock? How much voltage, amperage, and for how long? What type of irregular heart beat?
Yes, electrical shocks can cause an irregular heartbeat. If you were shocked you should seek medical attention immediately.