The closed end of the brake pad shoe should be facing the front. That ensures that when you brake the pad is prevented from being pulled out. If you have the shoes on the wrong way the pads will likely be pulled (by the friction from the rim) out. If heading downhill or approaching a T junction, this will be surprising to the point of shock (or worse).
The pads are shaped (as well as there being an arrow on them) so it's 'obvious' which way in they go. And the little screw has to line up with a groove in the back of the pad.
You can see both these features in the image
@Gunk posted (top of this page).
Also note need for toe in.