The simplest way is to use and editor (
vi ?) to create something like....
#!/bin/ksh
#################
# Server shutdown
#################
#
command1
command2
.
.
commandn
save this and endsure the script file is executable using chmod +x <scriptname>
then execute it by simply running the scriptfile - the same would apply for your shutdown script.
Depending on your situation it *may* not be quite as simple as this but I hope this gets you started