[[include? &file=`path/to/snippet.php` &var1=`hello` &var2=`world`]]
return $var1 . ' ' . $var2;
As of 2.2.0, you can simply add a "static" Snippet: just reference the static file.
This should work. But you can just make your snippet static and define the path to it.
http://rtfm.modx.com/display/revolution20/Snippets#Snippets-RecommendedMethodsandTips
As of 2.2.0, you can simply add a "static" Snippet: just reference the static file.