How can I set product images to change based on collection?

Dear Kjdointhings,

In which file should the above code be placed? Thank you in advance!