Don't quote this variable expansion:
The variable is expanded, and because it's not quoted, the shell will proceed to split it up into words, so you do execute: "composer" "install" (instead of "composer install" as a single word)
Don't wrap it in backticks. This is wrong:
That will execute the composer command, capture the stdout and then try to execute the output as a command.
One habit to get into is using bash arrays to build up commands. This is required because it's impossible for the shell to properly evaluate commands held in a single string when the command has arguments with whitespace. A fictitious example
cmd="composer install --users='fred barney'"
In this case $cmd will expand into 4 arguments, not the 3 you'd probably expect:
"composer" "install" "--users='fred" "barney'"
If this may affect you, arrays are the way to go:
cmd=( composer install --users='fred barney' )
This array has 3 elements. The way to execute that is thus (ugly but correct):