Yes, you can embed the contact form into your template file.
You cannot directly add the shortcode in the template file but you will need to pass the code into do_shortcode()function and display its output like this:
<?php echo do_shortcode( '[xyz-cfm-form id=1]' ); ?>