As .htaccess is a powerful tool. It gives you option to change the way the webserver serves your files. On most web hosting servers you can use SSI (Server Side Includes) in shtml, or shtm files.
However, you need to use SSI in your .html and htm files. There is an easy solution for this.
Just add the following line in your .htaccess file:
AddHandler server-parsed .html .htm
This line will tell the server to parse your .htm file as SSI and execute any SSI directives you have there.
You can also use .htaccess to enable CGI scripts execution as well as change the default extension for such files as well.
For Perl/CGI scripts you will need:
AddHandler cgi-script .cgi .pl
To make PHP files to be parsed as PHP when PHP is running as module
AddType application/x-httpd-php .html .htm
To make PHP files to be parsed as PHP when PHP is running as CGI (suexec, etc)
AddHandler application/x-httpd-php .html .htm