You might also be curious why the productsList variable is initialized as new list of strings at the start of the method, only for it to be overwritten by the code in the try block. This is a defensive mechanism that ensures that the productsList variable is always set to a meaningful value should the code in the try block fail for some reason. You will see an example of how such a failure might occur in Chapter 3.
To expand on Dusty's answer:
A more tentative version of
if the code fails
if the code should fail
In formal speech an writing, certain auxiliaries (principally 'had', 'were', and 'should', but occasionally 'could' and 'would' and rarely a few others) in an irrealis context can be inverted with the subject to get the same effect as the 'if':
should the code fail had he but known were he to leave now
"Irrealis" means that the event or state of affairs has either not yet occurred, or is known not to have occurred when it might have.
"If he knows" and "if he knew" are realis: they are about present and past fact, which are either true or false, even though the speaker may not know which. These cannot be turned round in this way.
"If he should know", is an uncertainty about the future; and "if he had known" expresses a possibility which is known not to have happened; these are irrealis, and can be inverted as above.
As Dusty says, the verb is subjunctive (though in fact 'were' is almost the only distinctive subjunctive verb form in modern English); but I've never heard it called "future subjunctive".
Should in this usage basically functions similarly to if or in case. You could rewrite the sentence in question as:
This is a defensive mechanism that ensures that the productsList variable is always set to a meaningful value if the code in the try block fails for some reason.
As far as how it functions as a part of speech, I believe it's the future subjunctive form of the auxiliary verb shall (i.e. should fail is the verb phrase)