Melt the butter in a medium saucepan over moderate heat. saute the onions with the salt until caramelized, about 10 minutes. Add the garlic and achieve paste and cook 5 minutes, stirring frequently with a wooden spoon to avoid scorching. Add the tomato paste and pour in the fish stock or clam juice and boil 5 minutes longer. Stir in the pepper and vinegar and remove from the heat.
Transfer the sauce to a blender and puree. Pass through a strainer. The sauce keeps up to 4 days.
To finish, pour the sauce into a large skillet. Bring to a boil over high heat. Stir in the scallops or shrimp, reduce the heat to medium and cook 3 to 5 minutes. Serve over a bed of white rice and garnish with the capers or pickled onions.