All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
The Prophet, sallallaahu ‘alayhi wa sallam, said 'that whoever dies while believing that there is no deity worthy of worship except Allaah The Almighty will enter Paradise'. [Muslim]
The Prophet, sallallaahu ‘alayhi wa sallam, also explained that whoever testifies that there is no deity worthy of worship except Allaah The Almighty, the One Who has no partner, that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger; that ‘Eesa (Jesus) is the slave of Allaah The Almighty and the son of His female slave, and His word which He directed to Maryam (Mary), may Allaah exalt her mention, and a soul created upon His command; and that Paradise is truth and that Hell is truth, Allaah The Almighty will admit him through any of the eight gates of Paradise that he wishes. [Muslim]
The Prophet, sallallaahu ‘alayhi wa sallam, also said that whoever testifies that there is no deity worthy of worship save Allaah, He The Almighty will prohibit Hell to afflict him and will admit him to Paradise. [Ahmad]
The Prophet, sallallaahu ‘alayhi wa sallam, also said that Paradise is due for a person whose last words in the worldly life are: there is no deity worthy of worship except Allaah The Almighty. [Ahmad]
Ahlus-Sunnah Wal-Jamaa‘ah have reconciled these Hadeeths (narrations) and the other Hadeeths that talk about the punishment of people who commit major sins. An-Nawawi explains that entering Paradise, as stated in the Hadeeths, occurs after the sinner has been punished according to his sins. This is because there are numerous Sharee'ah (Islamic law) texts that indicate that some sinners are punished. He also stated that Ahlus-Sunnah Wal-Jamaa‘ah opine that sinners are subject to the will of Allaah The Almighty Who punishes them or forgives them as He Wills. However, if He, The Almighty, chooses to punish them, He will unquestionably admit them to Paradise after they have been punished because they have died as Muslims.
On the other hand, a person who dies after repenting from his sins enters Paradise from the very beginning because of the mercy of Allaah The Almighty.
Allaah Knows best.