As the student rubs his feet on the carpet, negatively charged electrons are transferred from the carpet to his feet. This gives the student AS A WHOLE a net negative charge. The radiator is made from metal. Metals are capable of conducting electric charge. Because of the electrons the student has received, he is negatively charged with respect to the radiator. Therefore, when he touches the radiator, there is a transfer of negative electrons from the student to the radiator. This rapid transfer of electrons releases some energy as heat and sound, which we observe as an 'electric shock'.