Use a shrimp deveiner tool. Or peel the shrimp and cut along the backside. You'll see a dark line, which is the vein. Use the tip of a knife or toothpick to pull it out.