How can I develop a shipping method

Hi,

Could you give me any usefull advice to develop a new shipping method for marketpress? I need to make for "Correios", brazilian mail agency. It must be based in localization, product volume and product weight. Any tip, advice or help would be great.

Tks