You're looking for something similar to PHPs require or include function.
In WordPress we can use get_template_part( 'example-folder/template' );
to get template.php
from the example-folder
.
You should also look into the get_template_part functionget_template_part function to see the capabilities. If you're wanting to include outside variablesinclude outside variables into these, you can use PHP globals.