title: Query a component from an external script
body: <p>I'd like to instantiate a Joomla2.5 component (JoomShopping) and get some information from it via some of its methods. But I want to do this from another PHP application. I tried just including the main items from Joomla's index.php as follows below, but the JSFactory object is not instantiated. How do I activate this component so I can query it?</p>
  
  <pre><code>define('_JEXEC', 1);
  define('DS', DIRECTORY_SEPARATOR);
  define('JPATH_BASE', dirname(__FILE__));
  require_once JPATH_BASE.'/includes/defines.php';
  require_once JPATH_BASE.'/includes/framework.php';
  $app = JFactory::getApplication('site');
  $app-&gt;initialise();
  $app-&gt;route();
  $app-&gt;dispatch();
  
  $pm_method = JSFactory::getTable('paymentMethod', 'jshop');
  $pmconfigs = $pm_method-&gt;getConfigs();
  print_r($pmconfigs);
  </code></pre>