How it's done is quite easy. You remove the drain valve and use that tapping for the return water. The outlet tapping is used for the supply and the inlet tapping is plugged.
Is it safe? Not in my opinion and not in the opinion of many building officials. Many jurisdictions prohibit using domestic water heaters for space heating systems. Most manufacturers void any warranty for domestic water heaters used for space heating purposes.