Shell_command on frontend

Shell_command is not supported on the frontend? Have a simple command to reboot a remote pc - so what will be the best solution? Stick it to a separate script and then put the script to the frontend? Seems like unnecessary double coding