[php]
<?php
// Register a secure admin environment
Mage::register(‘isSecureArea’, 1);
// Load the Magento product by entity_id
$product = Mage::getModel(‘catalog/product’)->load($productId);
// Load the Magento product by sku
$product = Mage::getModel(‘catalog/product’)->loadByAttribute(‘sku’, $productSku);
// Load the Magento product by name
$product = Mage::getModel(‘catalog/product’)->loadByAttribute(‘name’, $productName);
// Delete the product
$product->delete();
?>
[/php]