Use magento functions in another database connection.

Would it be possible to use all the functions of the magento with a different connection from the local.xml of the magento? For example I would like to use:

$ customConnection-> getModel (& # 39; catalog / product & # 39;) -> getCollection ();

This other bank is also Magento with the same structure, as well as to use the Magento functions in another connection.