The easy way is to run a skewer through the shrimp and cook it with the skewer in. With more effort the shrimp can be straightened before cooking by careful slicing down the center line and across in several places. You can find videos online showing the technique.
I don’t know about the centerline, but I make several shallow lateral cuts across the underside (inside curve) of the tail, and gently straighten them on the cutting board.
Speaking of tails, Go ahead and eat the shell at the end of the tail. Crunchy, and you get some calcium.
I assume you’re making a funny, but there’s even styles of shrimp where you’re supposed to eat them shell and all (like Chinese salt & pepper shrimp, for instance.) Shrimp shells are not particularly difficult to chew or eat.