The best way to write a letter of recommendation is to start out with a formal greeting, or using "To whom it may concern" if you don’t know the recipient. Follow the greeting with 2-3 sentences of praise for the person you’re recommending.
Describe how you know the person. Give some context for your recommendation. Let the reader know how you met them, how you worked together, and your basic qualifications.