You got a shock because the connections were not sealed properly. When the heat tape is wired an electrical crimping tool is used to create the connection, and then usually is covered in either duct tape or some other insulator to prevent charge from passing and shocking you. Turn off the power source and find the connections, cover them in small pieces of duct tape.