Preheat the oven to 420°F (215°C).
Butter or oil your ramekins.
In a microwave-safe bowl or using a double boiler, melt the butter (or oil) and chocolate in 30-second intervals, stirring after each until smooth and fully melted. Once it’s smooth and melted, let it cool slightly.
Add the sugar to the melted chocolate, whisking until smooth.
Add the eggs one at a time, whisking well after each addition until they're fully mixed.
Add the flour and continue whisking until smooth.
Pour the batter evenly into the ramekins.
Bake at 420°F (215°C) for 10–12 minutes, until the edges are set but the centers are still soft.
Let sit for 1 minute, then carefully run a knife around the edges and invert onto a plate.