creating a custom shortcode using an outside apps function?

I have a great restaurant menu script that I want to incorporate into some of my WP pages and I'd like to have my users be able to just drop a shortcode into the editor to display the menu.

Example: [menu id=1]

Now, the script comes with a function called printMenu(); where you can also expressly pull in a specific menu like this printMenu(1);

How can I pass the var from my shortcode to the external function and have it return the results to the page?

You also have to have 2 includes on the page, one to the DB config and one to the above script functions file (this is no problem, just added conditional code to the template).

I have read tutorials on creating advanced short codes but passing a var to an external function seems a little tricky. (The script is under the same domain though.)

Thoughts? Suggestions?