Shaikhul Islaam Ibn Taymiyyah (may Allah have mercy upon him) said:

“And the one type of action that a person does in a manner in which he perfects in it his sincerity and servitude to Allah, can result in Allah forgiving his major sins just as in the Hadith of the card … So this is the situation of the one who says it (the Shahaadah) with sincerity and truthfulness, just as the person (in the Hadith) said it. Otherwise, the people of major sins who enter the Hellfire all say the statement of Tawheed, but their statement does not out weigh their sins like how the statement of the companion of the card outweighed (his sins)”. End quote. [Minhaaj as-Sunnah (6/218)]

Translated by

Faisal bin Abdul Qaadir bin Hassan
Abu Sulaymaan