title: How to query magento database tables to show categories and products?
body: <p>I have a PHP website and now the I want to add a shopping cart to my existing php website.
  So I am using magento for this.</p>
  
  <p>In the directory of my website I have created a new directory with the name of "shop" and put magento in this directory.</p>
  
  <p>My website is working fine. But on website's home page I want to show categories and products from the magento site so it is not possible to use the magento built-in functions for this as my website's home page is out the magento site.</p>
  
  <p>So I think I should query the magento database tables for this but the magento database tables are so complex so any body who can give me some idea about this problem?</p>
  
  <p>Is there any other way to solve my problem and if the only the query is the solution then how will I query the magento database tables to show categories and products.</p>
  
  <p>Thanks in advance.</p>