In my case, I need to adding shipping cost of Webshopapps Matrix Rates to cart automatically. If you meet the same requirement , you can follow these steps to make it done:
1/Create a xml file to declare new module: app/etc/modules/Inbusiness_Cart.xml

 

 

2/Create app/code/local/Inbusiness/Cart/etc/config.xml

 

 

3/ Create app/code/local/Inbusiness/Cart/Model/Observer.php

 

 

Resource:

http://excellencemagentoblog.com/magento-shipping-method-dropdown-default-shipping-method-on-cart-page
http://www.danneh.org/2010/08/adding-shipping-costs-to-the-cart-automatically-in-magento/
http://www.nicksays.co.uk/magento-events-cheat-sheet-1-8/
Mage::dispatchEvent(‘checkout_cart_save_before’, array(‘cart’=>$this));