Shutdown amplifier when headphones are connected
The 47K resistor is correctly placed, but the rest of the circuit has problems.

The LM4861 wants to see audio input centered on half it's supply voltage,

the shutdown pin wants to see less than that voltage else the amplifier shuts down.

So connecting the shutdown pin to R isn't going to work

headphones want to see bipolar audio signals (signals centered on ground, but feeding such signal to the LM4861 will cause clipping)

so with that schematic, whatever comes in from the left the amplifier isn't going to like it - the voltage is either wrong for the shutdown pin or wrong for the -in pin.

best fix is to fit a DC blocking capacitor before the amplifier and bias it up to 1/2VCC  and make sure the input to the jack is centered on ground.

If you can, use a socket that has a switch on R2 to control the amplifier