They don't really have much to do with each other at all. Shell scripts are a collection of shell commands than can be executed as a unit, while Ajax is a means to make asynchronous requests from a browser.
Now, Ajax can be used to trigger shell scripts as CGI programs...