In your php file add this at the top (before any HTML output):
<?php
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
$random_image = $site_template->clean_template(get_random_image());
?>
Define ROOT_PATH as relativ path to the directory 4images is installed in.
Then you can show the random image where you want with:
<?php
echo $random_image;
?>
Greets Jan