It’s that simple :
$appEmulation = Mage::getSingleton('core/app_emulation'); //Start environment emulation of the specified store $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId); //Stop environment emulation and restore original store $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);