I assume that somebody knows what "npm" is? I have no clue and the linked page doesn't tell me. OTOH it's happy to tell me to feed curl output straight into a root shell, an idea that makes me just a wee bit nervous.
Just invoking 'sh' really should not give you a root shell under normal circumstances.
You can try running 'echo "whoami" | sh | grep root' to verify this yourself.