I just had to massively rework an interface to another shopping site for a customer. Therefore, I had to programmatically create orders in Magento, which is really an awful challenge. A pretty nice help for this was the code of Vinai Kopp, published under Pastebin.
A little extension for Vinai’s code: If you already have a customer object
$customer and want to use the default billing and shipping address, you can set it like that (compare with line 42/43 of Vinai’s code):
Hope this helps someone 🙂