The Relation between International Law, Islamic Law and Constitutional Law of the IRI.pdf
How does the NPT contravene shariah ?
Goal of the NPT is the reduction and ultimate ellimination of nuclear weapons worldwide. As such this is seen as a goal beneficial to all let alone muslims.
When treaties are seen at variance with shariah, the states concerned file reservations along with their instruments of ratification/accession. No such reservation AFAICT has been filed by any arab country wrt to the NPT. That these countries ratified/aceeded to the NPT implies they found the NPT consistent with their own domestic law and agreed to honour their obligations. Otherwise they would not ratify/accede to such a treaty.
If Iran quits the NPT it won't be because of islamic law but rather that the NPT itself allows members to do so, see NoK.
Otherwise what you are saying implies no islamic state is capable of honouring an international treaty.Although Islamic law is still at odds with international law, Islamic states have largely accepted the binding character of the latter in spite of its discrepancy to Islamic law.