PHP code for Message Me button

Please advise, how to add Message Me button to my theme template.

Adding Message Me button with a shortcode it is not a solution for me. Please advise what php coe I need to implement to my theme templete instead of:
[pm_user user_id="1" text="Message Me"]