A 9-year-old boy caused a $2 million blaze at a Perth shopping centre when he used a cigarette lighter to ignite aerosol cans in a supermarket.

The boy started the fire at the Farmer Jacks supermarket at Thornlie Square Shopping Centre.

The centre was evacuated as fire crews fought the blaze.