Here is my fix:
On lines:
67,121,169,229
change:
($options, &$cache, 0, &$total);
to:
($options, $cache, 0, $total);
That is just remove the & in front of the $, seems to be working fine.
OK, I found the solution. Instead of trying to call the function directly I can just use the WP do_shortcode() function:
echo do_shortcode('[associated-posts]');
This works great in my theme file. Thanks for the great plugin, keep it up.