loadTemplates function should be called before loadNetlist is called. The reason for doing this is very simple: loadTemplates creates a data structure containing information about module-type templates which can be then utilized to assign types to particular modules being read from netlist by loadNetlist function. See Templatized module type library format and Netlist format for more information template and netlist file formats.
Afterwards, actions could be performed over a design - for an illustration, see Example of an application based on TASTE.