"How do you differentiate between a religion and a philosophy? I have met several people who say, "I'm not religious but I follow the Buddhist philosophy." Being an ex-engineer, I have the misfortune of looking at things as black and white. Consequently, the world of gray (my perception of philosophy so far,) is very new and perplexing to me right now.Interesting question. First, I'd preface what my take on it is by saying that, as with all matters of semantics/definitions/language, I suppose everyone has a slightly different impression of what the words mean and how they should relate to one another.
Your thoughts are sincerely appreciated"
It seems to me that nearly everything falls under the umbrella of philosophy. Anytime we ask "what is" or "what should be" we are asking a philosophic question. This includes questions of how we know what is, and how we determine what should be.
Then, as subsets of philosophy we have science. The philosophy of science is that subset which uses the scientific method of empirical observation and analysis to answer "what is". All practical science is based on the philosophic underpinnings of the 'philosophy of science'.
There are other subsets of philosophy which attempt to answer "what is" through methods such as mysticism, revelation, faith, magic, alleged extra senses, pseudosciences, and so on. In my view they are unfounded, but they exist as positions people hold for answering "what is" and are therefore also under the umbrella of philosophy.
Among these, then, would be religious philosophies. All religions are predicated upon a particular philosophy, which asks "what is" and "what should be". Some philosophies are secular and some are religious.
So, short answer: science and religion (and much else) are types of philosophies and subsets of philosophy. Some are good philosophies, some evil, some rational, some irrational, some wise, some unwise, etc.
• If you believe that tooth decay is caused by bacteria (what is), and you think brushing teeth would be a wise way to prevent it (what should be), that is philosophy.
• If you believe that attachment leads to suffering (what is), and that mindfulness and detachment would be a wise way to prevent it (what should be), that is philosophy.
• If you believe that we have souls in danger of eternal torment (what is), and that accepting Jesus Christ as your savior is the only way to prevent it (what should be), that is philosophy.
The fact that I find some of the above sensible, some of it probable, and some of it ludicrous is irrelevant to the fact that they are all philosophic positions and part of 'philosophy'.
Then one might ask, "how are we to define which philosophies are religious and which are not (or, which are secular)?"
For this, one could take either a "structuralist" approach or a "doctrinal" approach (these are my own terms and there is probably a more 'official' term for these approaches somewhere, which I'd know if I were less ignorant). I prefer the doctrinal approach, where we say that religious philosophies are those which include the supernatural and/or faith-based beliefs.
For more on what I mean by these approaches, and why I prefer the latter, I would offer 2.2 from my Principles of Socio-Personal Humanism on my philosophy site (link HERE).
Hope this answers your question - at least as for what I think on the matter. Feel free to convince me differently if you have other notions, as learning is always appreciated!
Note: Incidentally, I have just added a short essay on my Philosophy Site called What Is A Philosopher? in which I outline what I believe to be a good Philosopher Code.