open any module .zip file and modify the xml file to fit your module...
reate a file mod_yourmodule.php
start coding
if you want to access another databes, the database object of mambo doesn't work for you, so make your queries as you want...
as far as i know.. that's all what you need...