Energetic electromagnetic emissions by astrophysical jets like those that are launched during the collapse of a massive star and trigger gamma-ray bursts (GRBs) are partially attributed to relativistic internal shocks. The shocks are mediated in the collisionless plasma of such jets by the filamentation instability of counterstreaming particle beams. The filamentation instability grows fastest only if the beams move at a relativistic relative speed. We model here with a particle-in-cell (PIC) simulation the collision of two cold pair clouds at the speed c/2 (c: speed of light). We demonstrate that the two-stream instability outgrows the filamentation instability for this speed and is thus responsible for the shock formation. The incomplete thermalization of the upstream plasma by its quasi-electrostatic waves allows other instabilities to grow. A shock transition layer forms, in which a filamentation instability modulates the plasma far upstream of the shock. The inflowing upstream plasma is progressively heated by a two-stream instability closer to the shock and compressed to the expected downstream density by the Weibel instability. The strong magnetic field due to the latter is confined to a layer 10 electron skin depths wide.