Although the side edge in contact counts as the front, the other side still counts as a side and the original rear is still the rear.
If it recoils out of contact then it can't fight.
So if you are the player with the 2 ships, do the front one first.