I've always thought of religion as a particular type of philosophy.
The point in philosophy is to question the meaning of life, how we got here, why we exist, etc. And, now that we're here, how should we live our lives? This incorporates thinking about moral and ethical dilemmas.
Every religion attempts to answer these questions by relating them to a god, many gods, or some other kind of overriding spiritual force.
I'm an atheist, so I believe that philosophy gives much more scope for free thinking as you're not told what to believe. Religious belief should happen this way too, but not many religious people come to their conclusions by thinking it through; instead, they tend to believe what they have been taught (blind faith).