In my Qart Hadashtim armies they make up either the far left flank or the ends of both flanks if it is a small army. How you use them depends mostly on the army you are facing. In my campaign, I mostly face barbarian armies, which tend to form a blob rather than a line, so I have plenty of space to let my units walk around the enemy formation to their rear. If your enemy, for some reason, decides to put a phalanx unit on the flank, you should pull your units back and put them in reserve. The only unit you should have facing an enemy phalanx is another phalanx, anything else is going to get hacked to pieces.