Although FasTrack is designed to sit on just about any surface - rug, plywood, foam etc. it will tend to shift under the weight of trains as another forum member pointed out. Any pins or nails would have to go through the foam board to some type of base such as plywood underneath. That said, the more I work with foam board as a layout base the more I really like it.
To stay with just foam board you would have to consider some type of glue. The good news is that because FasTrack snaps together relatively well, you don't need to glue many pieces. You can probably secure an entire oval with just four key pieces - I recommend curves since they'll receive the brunt of the stress and vibration.
To keep things flexible, you best choice of an adhesive would actually be a glue gun since the resulting glue can usually be peeled off in worst case heated back up to soften it. To keep from melting the foam with the hot glue you'll need a low heat glue gun. You can also apply the glue to the track and wait a moment for it too cool a bit before pressing down on the foam.