No doubt, the best place with an engine-fire is on the ground. But HOW you get there is just as important.
Here’s just some additional food for thought: The approach might become a bit de-stabilized when shutting down the affected engine; and (on the 737) we have to retract flaps to 15 and add up to 20 kts. If you happen to be field-limited on your landing with a contaminated runway on a remote airport with wx right at minimums, you’re probably better off going around and get things organized first before attempting to land (positively extinguishing the fire and/or completing the shutdown procedures). This also gives the f/a’s more time to prepare the cabin for an orderly evacuation plus the rescue-services at the airport a chance to get things rolling before you come in. Also, on climb-gradient limited missed-approaches it may not be wise having to go-around because you’re becoming totally de-stabilized below DA – better to start your missed well above minimums.
One may even be able to relight the engine after a “plain” flameout. A fire on turbojet-engines usually is of the contained type, and can quite easily be extinguished by shutting off the fuel supply and engaging the extinguishers. I even heard the argument that inflight airflow can prevent the fire from creeping upwards into the wing…
Since there are many factors involved in the decision, it is a good idea to think about your options when preparing for the approach.