There are several ways to do it. If your server supports it, you can execute php code in a html file with a command like the following in the .htaccess file RemoveHandler .html .htm
AddType application/x-httpd-php .php .html
Another way would be a rewriterule to change the php files to htm files.
RewriteRule (.*)\.htm$ $1\.php
check the syntax as it may not work on all servers.