Fogs are switched on the high side, both the lights themselves and the relay that sends power to them. Check the diagram and description at this post
for more information. I think that terminal 3 on the switch would be your best bet. Or you could tap off of the wire that feeds the bulb itself.
This assumes that your Forester is wired the same as mine.
Help us help you by filling out the vital details of your Forester in your signature. Year, model, transmission type ought to do it just fine. That way we can fine tune any advice on this and other questions you might ask.
Standard disclaimer: There could be differences among models, model years, transmission or engine types, national markets, or even within a model year. Remember, this is an international forum. Exterior lights and any device that employs the radio spectrum may be subject to differences due to national or even local regulations. Subaru's official wiring diagrams have occasionally been found to be incorrect. Test everything before proceeding. Follow these instructions at your own risk. May contain peanuts. YMMV!
Standard request: Let us know how it works out, so that the next person who searches for solutions to a similar problem might find the answer here without having to ask and start yet another thread. The job's not done till the paperwork is in!