Shahmukhi is the SCRIPT that has always been used for URDU since pre-British times. Most of the Daily Work of even Maharaja Ranjit Singh, for example is in F{censored}E language written in SHAHMUKHI SCRIPT. URDU/F{censored}E has since Islamic times been the language of the Courts and Administration.
Gurmukhi on the other hand has NEVER been a Court script or script of Administartion..even in the Khalsa Raaj of Maharaja Ranjit Singh..and not even in the PUNJABI SUBA that was specifically created after TWO DECADES of bloody struggle by Sikhs of the Indian Punjab based on other 14 Language Based Subas that were AUTOMATICALLY CREATED in 1947 by Delhi Govt BUT DENIED to PUNJABI/GURMUKHI....even though Punjabi was admitted as the 15th Officially recognized Indian language. At the Height of the PUNJABI SUBA AGITATION..almost 100,000 Sikhs were in Prison, Processions were Lathi charged, it was OUTLAWED to even Say Punjabi Suba Zindabad in Public or in Print. The 1965 War with Pakistan and the Sikh/Punjab conduct in defeating Pakistan finally persuaded the NON Nehru-Gandhi PM of India Lala bahadur Shastree to Agree to Grant the Punjabi Suba State for Gurmukhi/Punjabi...BUT Shastree was killed in mysterious circumstances in Russia and INDIRA GANDHI came on the scene..and she being her Fathers daughter (NEHRU had publicly declared that Punjabi Suba would be created only OVER MY DEAD BODY )..she tried to Evade the Promise given by Shastree Ji...but finally she had to submit to the demand.BUT her Administration managed to CUT OUT the capital City Chandigarh. Himachal pardesh..Haryana.the Punjab Rivers Headwater works Bhakhra Dam, etc etc and many Punjabi Speaking Villages etc etc OUT of Punjab to make the Punjabi Suba as SMALL as POSSIBLE. ..But UNTIL TODAY..the politicla circumstances of Indian Punajb is such that PUNJABI/GURMUKHI gets NO PLACE or LAST PLACE after HINDI/ENGLISH on all and every public signboard, road signs Govt Forms files etc. IF one Passes through Maharashtra..Gujrat, Kerala tamil nadu etc etc..one will NOT FIND A SINGLE WORD IN HINDI anywhere on buses, roads , poilce stations Govt offices etc becasue thsoe Subas give TOP priority to their MOTHER TONGUE as natural..BUT NOT in PUNJAB...here PUNJABI is given STEP MOTHER treatment or worse servant of Hindi/English...isntead of being given due HONOUR as the MOTHER !!
SHAHMUKHI..Script is used by Pakistani PUNJABIS who LOVE their MOTHER TONGUE PUNJABI..and who also wish to use their own SCRIPT (Urdu script)..to write PUNJABI. Pakistani GURDWARAS are mostly PRE 1947..hence its Natural their STONE walls etc have GURMUKHI script..and are visited by SIKHS so its natural Sikhs give preference to GURMUKHI....You may be Surprised to note that MOSQUES and MUSLIM DERAS in INDIAN PUNJAB have GURMUKHI SIGNBOARDS as PROMINENT Language...because SHAHMUKHI/URDU being no longer lingua franca post 1947..its not taught in schools and therefore very few Punjabi know how to read or write this script..
This is all the info i can provide..someone more knowledgeable may have more to say..