Cook the pasta in boiling, salted water according to package directions.
Meanwhile, melt the butter in a large frying pan.
Add the onion to the melted butter and sauté for two or three minutes or until the onion is beginning to become translucent.
Stir in the fresh or frozen scallops. (If using fresh shrimp, add them now too.)
Cook for a minute or two, turning the scallops occasionally.
Add the frozen peas.
Continue to cook, stirring almost constantly. When the scallops look cooked (this will take approximately two to four minutes more), add the frozen cooked shrimp.
Stir in the pesto and cream and warm everything through.
Taste for seasoning and add a bit of pepper if desired.
Drain the pasta and stir in the Scallop and Shrimp Sauce.
Serve on warmed plates, sharing the scallops between them. Garnish with dried basil if desired.