LinkedIn is very persistent about reminding you to get recommendations, and rightfully so. Recommendations are a great way that people can learn about you before they ever reach out to you. But that said, asking for them can be intimidating. LinkedIn does have some generic copy that you can use, but it is better if you can personalize your message. Here is some copy you can use to personalize your request for testimonials. Feel free to modify it so it is in your own words:
Hi [NAME]—I am updating my LinkedIn profile and would like your help. Since we have worked together and I value your opinion, would you please write a recommendation for me? Thank you in advance for your help.
You can also be more specific and ask that the recommendation include specific phrases or focuses on a particular skill set that you have.