Wordpress function use in other files

Hi is there any way to use the wordpress functions outside of the system itself?

My scenario:

I have made a form processing file signup.php, which I put with the rest of template files. Now when a user fills in the form on my homepage or other pages (all using index.php), the form on will call signup.php to send an email with the details and present a thank you note. I wanted to style the signup.php page like the rest of the site and thus tried to use get_header and get_footer, for example. However I’m getting a fatal error. How I should I go about fixing this? thanks

If I’m remember well, you have to put these line at the top of your php file:

if ( !isset($wp_did_header) ) {
		$wp_did_header = true;
		require_once( 'wp-load.php');
		require_once( ABSPATH . WPINC . '/template-loader.php' );