This honourable Ayah judges against those who claim to love Allah, yet do not follow the way of Muhammad. Such people are not true in their claim until they follow the Shariah (law) of Muhammad and his religion in all his statements, action and conditions.
It is recorded in the Sahih that the Messenger of Allah said, ”Whoever commits an act that does not conform with our matter (religion), then it will be rejected of him.
Allah then said, ”And forgive you your sins. And Allah is Oft-Forgiving, Most Merciful.” meaning, by your following the Messenger, you will earn all this with the blessing of his mission.
From the Tafsir ibn Kathir.