This should do it:
$resource = $modx->newObject('modResource');
$resource->fromArray(array(
'pagetitle' => 'My Resource Title',
// add other resource properties here
));
$resource->save();
There are some forum posts and articles out there that will help you with this, if you Google hard enough...