I'm trying to create an order outside Magento, my current problem is that I need to know the shipping tablerate cost before creating the order in Magento.
Any suggestions?
There are 2 options:
Table rates are stored in shipping_tablerate
table. So knowing your calculation type (Magento table rates have 3 calculation variants) and order conditions (weight, price, destination, # of items) query database directly.
You can create a quote object, add quote items and addresses and then run Mage_Shipping_Model_Shipping::collectRatesByAddress
.