curl https://example.com/file.sh | bash
If your shell script needs sudo access, just:
curl https://example.com/file.sh | sudo bash