The simplest Joomla module contains 3 files.
1. XML manifest file 2. PHP file (main controller file) 3. 1 Dummy HTML file
The XML manifest file contains the parameters and installation instructions for the module. This file must have the same name as the folder which contains all module files; such as mod_popper.
This file is just a line of code to make sure others cannot see files within this directory, but it does function with the module itself.
The PHP file is the controller file like it was designated in the parameters in the XML file. This file could be something like a self-checking form or another program. Alternatively,
More instructions can be found here:
Build a Simple Module
Alternatively, all modules (except custom modules made in Administrator) show their files in the modules folder. If you had more than one template, a filelist could be made in the XML manifest file.
If the module is to have a list of templates or a template path, this code would be added to the php file:
The folder would be called tmpl and would have the default.php file and images for the template. These file names would be added to the xml file.