Peel the shrimps, leaving 5-6 whole. Save the heads and discard the shells from the rest.
Prepare the sauce. Preheat the oven to 180° C, fan oven. Put the tomatoes, bell pepper, onion, garlic, salt and pepper on a baking tray. Drizzle with the olive oil. Bake in the preheated oven for 45 minutes.
When the vegetables are cooked, transfer them to a blender with the almonds and chili flakes. Grind to make a thick sauce.
Place half of the olive oil in a large frying pan over medium heat. Add in the heads of the peeled shrimp and the whole shrimp. Sauté, stirring until the heads change color and the heads release their juices and flavors. Remove the heads from the pan and discard (or feed them to the cats!). Remove the whole shrimp and leave them aside.
Add the remaining olive oil to the pan and add the peeled shrimp after seasoning with salt and plenty of pepper. Sauté until they change color. Add the whole shrimps to the pan and pour the ouzo over them. Let them simmer until the alcohol evaporates. Add the sauce to the pan and mix. Remove from the heat until the pasta is cooked.
Boil the spaghetti in plenty of salted water 1 minute less than the recommended time on the package. Drain them but reserve about 1 cup of the water.
Transfer the spaghetti to the pan with the shrimp after returning it to low heat. Add just enough water from the pasta to make the sauce not too thick. Stir on the stove for about 1-2 minutes until the sauce thickens and the pasta is al dente.
Serve immediately sprinkled with basil if desired and drizzled with a little olive oil.