  We study the afterglow phases of a GRB through relativistic
magnetohydrodynamic simulations. The evolution of a relativistic shell
propagating into a homogeneous external medium is followed. We focus on the
effect of the magnetization of the ejecta on the initial phases of the
ejecta-external medium interaction. In particular we are studying the condition
for the existence of a reverse shock into the ejecta, the timescale for the
transfer of the energy from the shell to the shocked medium and the resulting
multiwavelength light curves. To this end, we have developed a novel scheme to
include non-thermal processeses which is coupled to the relativistic
magnetohydrodynamic code MRGENESIS in order to compute the non-thermal
synchrotron radiation.
