ericferret,
Spraying foam into the intakes is not done in an attempt to put out an engine fire; rather, it is done to try and block the air supply to a running turbine in order to stop it when it is unsafe to approach the aircraft and reach the fuel cutoff switch.