The electron-gamma shower code EGS4 was applied to the simulation of energy deposition from runaway electrons in the plasma facing components of tokamaks. We calculated the energy deposition in the layers of carbon and molybdenum irradiated by electrons which energies were from 10 to 300MeV and the incident angles were from 0.5 to 25 degrees. The energy depositions calculated by EGS4 were compared to the results of GEANT3. EGS4 calculated higher total energy deposition rate in both carbon and molybdenum layers, and lower peak energy at the surface of molybdenum layer. EGS4 was also applied to the calculations of the energy depositions on three types of proposed ITER divertor targets. The results of these calculations showed that the peak deposited energies on metallic components were not affected by their geometrical shapes in case of low incident angle.