What are some best practices for integrating PHP code snippets from external files into a website?

When integrating PHP code snippets from external files into a website, it is important to ensure that the files are securely included to prevent any security vulnerabilities. One best practice is to use the `include` or `require` functions to include the external files, as they provide better control over the inclusion process and help prevent issues like file path traversal attacks.

<?php
include 'external-file.php';
?>