When you work with Magento, it’s often needed to use the Magento classes and Models outside the Magento core. What I meant is when you want to create a customer programatically outside Magento’s framework,, may because of a custom functionality that you want to build on some other applications.
Copy the below code to run Magento code externally.
<?php require_once('app/Mage.php'); //Path to Magento umask(0); Mage::app(); //That's it, start running Magento code //Load a product with ID 8090 $_product = Mage::getModel('catalog/product')->load(8090); echo $_product->getName(); //Prints T-Shirt
You have to point the Mage.php as the first line of the code, so that adjust Mage.php path accordingly.
Mage::app(); intiallizing the Magento bootstrap code.
By this way you can access any Magento function through your external PHP program.