In a large heavy-bottomed skillet, heat the vegetable oil over medium heat. Gradually whisk in the flour to create a roux. Cook, stirring constantly for about 10-15 minutes until the roux turns a medium brown color, similar to peanut butter.
Add the chopped onion, bell pepper, and celery to the roux. Sauté the vegetables for about 5 minutes until they are softened.
Stir in the minced garlic, Cajun seasoning, salt, black pepper, and cayenne pepper (if using). Cook for an additional 1-2 minutes to enhance the flavors.
Gradually whisk in the seafood stock, ensuring there are no lumps from the roux. Bring the mixture to a simmer, then reduce the heat to low.
Add the shrimp to the pot and cook for about 5-7 minutes, until the shrimp are pink and cooked through. Taste and adjust seasoning as necessary.
Serve the shrimp étouffée over a bed of cooked white rice, garnished with chopped green onions.