My guys are barefoot, so I'm not 100% about this information, but I believe you can use magic cushion under a shoe.
My trimmer recommended it in very dry weather when my flat footed gelding was a little sore. She said that it could be left on for several days without harm and people used it under shoes. Thankfully the gelding never got sore enough that I felt the need to use it (and is ok on hard ground now that his feet are in better shape!).