stand 6-8 feet back and aim at the base of the fire,Empty the extiguisher.
The distance is crucial, too close and the 300-800PSI will assuredly blow the fire to a new location, then your in deep doo-doo.

ABC is best, makes a bit of a mess,co2 not recommended for electric fires, It is very conductive.