Here’s a short version:
first, load model helper
JLoader::import('joomla.application.component.model');
second, import the model, adjust with your own component, first parameter is the filename without .php
JLoader::import( 'renewal', JPATH_ROOT . DS . 'components' . DS . 'com_mymember' . DS . 'models' );
third, create new instance. in this case, the class name is mcsmemberModelRenewal
$renewalmodel = JModel::getInstance( 'renewal', 'mcsmemberModel' );
now you can use the model, ie:
$renewalmodel->someMethod();
happy coding!
