Hello and welcome to healthcare forum Isha.
As you said, your husband is having pain while retraction of foreskin it suggest that he is having tight frenular attachment which may be the reason of difficult intercourse and he requires circumcision
The reason of bad smell is collected smegma
beneath the foreskin, Which also indicate that your husband is not regularly retracting his foreskin due to pain.
So, convince him to consult a surgeon for further treatment.
Best of luck.