You can use the :!
vim command. For example, to echo 'Hello, World!'
from inside vim (and therefore from within a vim script, also), type
:! echo 'Hello, World\!'
in vim. Or, in a vim script, you can put just
! echo 'Hello, World\!'
The reason you need the \ before the ! is because vim performs special handling of ! characters in the argument of a ! command. If you were running a command that does not include any ! character, then you do not need to escape it.
If you want to read more in depth about this, you can type
:help :!
in vim, as @FDinoff said.