Just testing this on a site and am having trouble with the path I think, (got it wokring on another site fine)
My function is here: domain.com/shop/library/smarty/plugins/function.recentposts.php
My Wordpress install: domain.com/wp/wp-load.php
The path in function file: ././././wp/wp-load.php
Looks ok to me
Im just getting call to undefined function error on screen. The only difference in each test site is the path and the fact that on this site I did the install in /wp/ but set the site to appear as if it is on the root, could that be it?