Creating shipment programmatically in magento
devm.com.np
<?php
$order      
Mage::getModel('sales/order')->load($orderId());

$shipment Mage::getModel('sales/service_order'$order)->prepareShipment(array());

$shipment->register();

$shipment->getOrder()->setIsInProcess(true);
$transactionSave Mage::getModel('core/resource_transaction')
    ->
addObject($shipment)
    ->
addObject($shipment->getOrder())
    ->
save();
    
$shipment->sendEmail(true);
?>