Is testifying that Muhammad is the Messenger of Allah equal to testifying that there is no god but Allah?
Question

I bear witness that there is no god but Allah *and* I bear witness that Muhammad is the Messenger of Allah. My question is: does the conjunction “and” (wa in Arabic) indicate that the two phrases are equal, and is it valid to say that testifying that Muhammad (blessings and peace of Allah be upon him) is the Messenger of Allah equal to testifying that there is no god but Allah?
Praise be to Allah.Al-Bukhaari (8) and Muslim (12) narrated that Ibn ‘Umar (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Islam is built on five (pillars): the testimony that there is no god but Allah and that Muhammad is the Messenger of Allah, establishing prayer, giving zakaah, Hajj and fasting Ramadan.”
The shahaadatayn (twin testimony of faith) is one of the pillars of Islam, and this first pillar of Islam is a belief that includes affirming the oneness of Allah and testifying to the message of His Prophet. The conjunction wa (“and”) indicates that the two phrases come under the same ruling, which applies equally to both. Just as it is obligatory for an individual to say “I bear witness that there is no god but Allah (ash-hadu an laa ilaaha ill-Allah),” and his Islam is not valid, and he has not entered Islam, unless he says that, the same ruling applies equally to the second half of the shahaadah (testimony of faith): “I bear witness that Muhammad is the Messenger of Allah (ash-hadu anna Muhammadan rasool-Allah).” So the individual must also say this, and his Islam is not valid, and he has not entered Islam, unless he says it. So these two phrases are equally subject to the ruling, and they are the two halves of a single pillar of Islam, which is the Shahaadatayn (twin declaration of faith).
Al-Haafiz Ibn Hajar (may Allah have mercy on him) said:
One may recite only the testimony that there is no god but Allah, whilst intending both parts of the twin declaration of faith, because they are strongly interconnected.
End quote from Fath al-Baari (1/133).
Al-Mullah ‘Ali al-Qaari (may Allah have mercy on him) said:
Because the two parts of the twin declaration of faith are inseparable according to Islamic teaching, they are regarded as one thing, and one of the two phrases may appear in a report on its own because it is sufficient to indicate both of them.
It was said: it may be understood from their being mentioned together in most reports that in order for a person’s Islam to be valid, it is essential to recite them both together, one after the other, in this order. End quote.
Mirqaat al-Mafaateeh (1/168).
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
The testimony that there is no god but Allah and that Muhammad is the Messenger of Allah is regarded as a single pillar, because in every act of worship it is essential to have true sincerity towards Allah alone and to follow the way of His Prophet (blessings and peace of Allah be upon him).
End quote from Liqaa’ al-Baab al-Maftooh (2/197).
Shaykh Ibn Jibreen (may Allah have mercy on him) said:
The two phrases of the twin declaration of faith are inseparable; whoever testifies to one of them, that implies that he testifies to the other. In fact, the second one is complementary to the first, because we say: how do you know that there is no god but Allah, and that Allah is the true God, and that no one deserves to be regarded as divine except Him? Is that not through the message of the Messenger? Hence you must believe in the Messenger and testify that he was sent by his Lord.
If you believe that the Messenger (peace be upon him) was indeed a Messenger, and that he was sent by his Lord, then what is the message that he conveyed? Is it not the case that the first thing he began with was to affirm the oneness of Allah by saying, There is no god but Allah? So the Messenger (blessings and peace of Allah be upon him) began by calling people to worship Allah alone and to give up the worship of anyone other than Him. This is the greatest message that he conveyed. Therefore the two halves of the twin declaration of faith are inseparable, and whoever testifies that there is no God but Allah must pronounce the second half of the testimony of faith, which is testifying that Muhammad is the Messenger of Allah. Whoever testifies that Muhammad is the Messenger of Allah must accept his message, the most important part of which is the belief that there is no god but Allah. From this we know that the two parts are inseparable.
End quote from Sharh at-Tahhaawiyyah (45/12).
And Allah knows best.