First of all calling it "the shahada" is strictly speaking wrong, as these are two shahadat and they are called a-shahadatayn الشهادتين or a-Shahadatan الشهادتان (depending on grammatical circumstances, for example the later would apply in the Beginning of a sentence) in Arabic. Arabic has a dual plural ( a plural for two people).
So you need to testify two things to be called a Muslim: First testify that Allah is the one and only God and secondly that Muhammad is the/a Messenger of Allah.
The most important isn't to testify it by saying it only, but you need to believe it as well, as you may conclude from the some of reports like the well known hadith of Jibreel (where we are taught the meanings of Islam, iman and ihssan/ehssan) which includes your first version (the same version as in the adhan and iqamah) or this hadith of 'Omar () explaining the meaning of Islam) and this statement of his son Abdullah ibn 'Omar ():
... "O son of my brother! Islam is founded on five principles, i.e. believe in Allah and His Apostle, the five compulsory prayers, the fasting of the month of Ramadan, the payment of Zakat, and the Hajj to the House (of Allah)." ... (sahih al-Bukhari)
Each of your two options does this perfectly even if the meaning is a bit different.
A detailed explanation of the words of the two shahadah
أَشْهَدُ : ashhadu - means for us who have not witnessed Muhammad () "I testify" a more correct translation might be "I witness", but that doesn't make sense in this context, (the verb -past form- is shahida شَهِدَ) you could also say "أنا أَشْهَدُ" (anaa ashhadu) with the emphasis on the pronoun I which in this example is explicitly quoted!
IMO this verb or this expression is essential to call any following statement a shahadah (in jurisprudence any testimony you make is called a shahadah how ever you might use an other wording)!
أَنْ : an - means "that".
لاَ : la - stays for "no".
إِلَهَ: ilaha - stays for "deity", according to the pronunciation it could also be written إِلَاهَ because the alif is emphasized and prolonged!
إِلاَّ: illa - describes an exception so it means "expect".
اللَّهُ : Allah(u) - is the Arabic word describing the one and only God. The diacritic must not be pronounced.
وَ : wa - is almost everywhere an "and".
أَشْهَدُ : has been explained as this is a repetition, note that this repetition is not necessary to say the (two) shahadah (see for example the shi'a addition وعليٌ وليُّ الله which has no ashhadu in front of it), but it gives more emphasize to the meaning!
أَنَّ : anna - is an other form to express "that" the reason why here there's more emphasize on the second letter "n" is that the following word allows this, so this should be the standard expression in Arabic to express an Arabic synonym of the English "that"!
مُحَمَّدًا : Muhammadan - Muhammad is the name of the Prophet of Islam as you know, note that in Arabic almost all nouns must follow the rules of grammar! An interesting investigation for the Arabic proposal would be: Why is it مُحَمَّدًا and not مُحَمَّدٌ (Muhammadun) because the wa (and) might grammatically imply the later!
Now we have options such as:
عَبْدُهُ : 'abduhu - meaning HIS servant.
وَرَسُولُهُ : wa rassuluhu - note here is an other hidden wa and so it means and HIS messenger the last letter (hu) refers to (HIM) Allah.
This version of "the shahadah" is the one from at-tashahud as quoted in ahadith like this one.
or
رَسُولُ : rassulu - meaning the Messenger.
اللَّهِ : Allahi - this is tricky as the last diacritic at the "h" of the word Allah (hi) gives the meaning: of Allah.
Note that during adhan and iqamah you are quoting "the shahadah", so basically a Muslim quotes them at least ten times a day!
More expressions and references from the sunnah
Here are links for other expressions of the two shahadah (some include more than that) which have been quoted in ahadith I haven't quoted so far:
On the authority of 'Obadah ibn as-Samit () (including 'Isa in the shahadah).
The famous hadith which is used as an indication for Islam being a violent religion.
On the authority of Abdullah ibn Masu'd () (about tashahud).
And finally on the authority of Abdullah ibn 'Amr ibn al-'Aas ().
I'd like to add that the sect of Quranist says that the second part of the shahdah is shirk! This isn't true as it is a true statement in which we declare and affirm that Muhammad is Allah's Messenger note that the Quran is full of statements affirming this, so this objection is meaningless, as we nowhere attribute to Muhammad () something more than him being a human, a Prophet and a Messenger of Allah which is far away of setting him equal to Allah or calling him deity, which is the meaning of shirk!