Best way to render a form on a node?
You want to avoid putting this into your node template. Generally you want to keep "business logic" (any php functions other than print) out of template files. You might be better served by creating this as a block and placing it below or above the node because it is more reuseable. If you don't want to use a block you can use hook_node_view() and add an additional element to $node->content as in the linked example.