Context : Plasma processes close to supernova remnant shocks result in the amplification of magnetic fields and in the acceleration of electrons , injecting them into the diffusive acceleration mechanism . Aims : The acceleration of electrons and the magnetic field amplification by the collision of two plasma clouds , each consisting of electrons and ions , at a speed of 0.5c is investigated . A quasi-parallel guiding magnetic field , a cloud density ratio of 10 and a plasma temperature of 25 keV are considered . Methods : A relativistic and electromagnetic particle-in-cell simulation models the plasma in two spatial dimensions employing an ion-to-electron mass ratio of 400 . Results : A quasi-planar shock forms at the front of the dense plasma cloud . It is mediated by a circularly left-hand polarized electromagnetic wave with an electric field component along the guiding magnetic field . Its propagation direction is close to that of the guiding field and orthogonal to the collision boundary . It has a frequency too low to be determined during the simulation time and a wavelength that equals several times the ion inertial length . These properties would be indicative of a dispersive Alfvén wave close to the ion cyclotron resonance frequency of the left-handed mode , known as the ion whistler , provided that the frequency is appropriate . However , it moves with the super-alfvénic plasma collision speed , suggesting that it is an Alfvén precursor or a nonlinear MHD wave such as a Short Large-Amplitude Magnetic Structure ( SLAMS ) . The growth of the magnetic amplitude of this wave to values well in excess of those of the quasi-parallel guiding field and of the filamentation modes results in a quasi-perpendicular shock . We present evidence for the instability of this mode to a four wave interaction . The waves developing upstream of the dense cloud give rise to electron acceleration ahead of the collision boundary . Energy equipartition between the ions and the electrons is established at the shock and the electrons are accelerated to relativistic speeds . Conclusions : The magnetic fields in the foreshock of supernova remnant shocks can be amplified substantially and electrons can be injected into the diffusive acceleration , if strongly magnetised plasma subshells are present in the foreshock , with velocities an order of magnitude faster than the main shell .