The secret is in the pop up menu "Services receive selected" at the top of the dialog. Set this to "files or folders".
Then your Automator service will get passed the list of selected files and folders.
Now you just need to use them. Add a "Run Shell Script" action. The shell script can get passed the list as either arguments or via stdin. Given that you are unlikely to select enough files to cause problems in an argument string then select "as arguments" in the "Pass input:" pop up.
Matthieu is right - you should have a confirmation.
Everything will now look like this :-