get_template_partwill do the job better, while giving extra flexibility. For example:
custom-loop.php. If the file does not exist, it will load
custom.php, and if a child theme exists, it will load the child theme version of the file.
loop.php, but if a custom version of the template exists for that post type, it will load that instead. e.g.
locate_templatefunction. This function finds the appropriate file, and returns its name. This is useful for finding a template, without loading it.
template_includefilter. Scroll down for a more in depth look at the
functions.phpis a file in your theme that gets loaded prior to any templates. If your theme has non-template functionality, such as changing the length of excerpts, adding stylesheets and scripts, etc, this is where that code would go.
functions.phpand plugin development. However, there is a difference in how it's loaded.