How can Growl trigger an shell script or AppleScript (NOT vice versa!)
Growl 2.1 does support ScriptActions, but it doesn't seem to be documented anywhere but a google group thread. Below is a simple example from the thread. You create a script file with the content, place it in ~/Library/Application Scripts/com.Growl.GrowlHelperApp, and then set it up inside Growl as described in the same thread.

using terms from application "Growl"
    on perform action with notification
        ignoring case
            if notification's app name is "test growl" then
                activate me
                display dialog "goodbye" with icon 1
            end if
        end ignoring
    end perform action
end using terms from