You will start the tool inside the first tab ('Categories').
Make sure you select Wikimedia Commons here, by clicking on Commons.
Categories: Type or paste one or more Commons category names here which contain the file names you want to retrieve. Omit the Category: prefix.
You can indicate the depth with which you want to retrieve files from the category tree. In the example shown on the left, we are retrieving files that are directly in the category Uploaded with iNaturalist2Commons AND that have the category Lepidoptera of Australia (or one of its subcategories, up to three levels deep).
Combination: if you select the radio button 'Intersection', you will only retrieve those files that are in all your chosen categories - usually a smaller number of files. If you select the radio button 'Union', you will retrieve a larger number of files that are in either of the categories you entered. Usually 'Intersection' is the logical option.
Go to the next tab in the tool ('Page properties').
Namespaces: Deselect the first (unnamed) checkbox and select the File checkbox. This indicates that you only want to retrieve file names (not categories, not gallery page titles, etc).
If you like, you can now already click on the 'Do it!' button to verify that you are indeed retrieving the right file names.
In some cases, it is convenient to retrieve the file names as plain text, or in another format. You can adjust that in the last PetScan tab ('Output').
Format: for instance, select the 'Plain text' radio button.
Scroll down and click on the 'Do it!' button again. You will now see the list of file names as plain text.
If you chose 'Plain text' as output format, you will get a list of file names in plain text.