500°C is quite cold for a flame, if you see flame at all, it is probably hotter than that. If you think the temperature is not much higher, a thermocouple of type K would do - pretty much standard for measuring temperatures in this range.
One can measure the temperature of flame directly.
Please read this:-
Temperature measurement in today’s industrial environment encompasses a wide variety of needs and applications. To meet this wide array of needs the process controls industry has developed a large number of sensors and devices to handle this demand. In this experiment you will have an opportunity to understand the concepts and uses of many of the common transducers, and actually run an experiment using a selection of these devices. Temperature is a very critical and widely measured variable for most mechanical engineers. Many processes must have either a monitored or controlled temperature. This can range from the simple monitoring of the water temperature of an engine or load device, or as complex as the temperature of a weld in a laser welding application. More difficult measurements such as the temperature of smoke stack gas from a power generating station or blast furnace or the exhaust gas of a rocket may be
need to be monitored. Much more common are the temperatures of fluids in process support applications, or the temperature of solid objects such as metal plates, bearings and shafts in a piece of machinery.