what ever you do. Do NOT make changes to magento core files. That will break you magento upgrade functionality. Or it will just overwrite the chages you might have done to core files.
You need to identify the functionality of magento you want to integrate with economic. when this is done you write the corresponding magento object overloads.
Here is some info on magento controllers overload :
http://www.magentocommerce.com/wiki/how ... controllerOr maybee you do not what to invent the wheel once more. And look at the MAgento Extension we done for integrating MAgento with economic.
Example magento store where it is in production :
http://www.taarnsalg.dk