The relative clause describes the boxes, not the shelf. Complete: The boxes on the shelf that ___ green contain spare parts.
توضیح
The premise makes boxes the antecedent of that, so the plural auxiliary are agrees with them. The singular shelf is closer to the pronoun but is not the intended antecedent, making is painted the misleading agreement choice.