Probando a poner el \"\ supongo que con " tb serviria.
Código PHP:
$mostrar_foto="<a rel=\"\shadowbox[verfotos];options={counterType:'skip',continuous:true,animSequence:'sync'}\"\ href='".$foto1."'><img src='".$foto1.">' width='280' height='200'></a>";