Shelly 1 wiring behind 2 way switch

See if you can make sense of

You’d need to find which of your two-way wall switches has the common wire connected to the lamp (the other wall switch will be connected to permanent live feed). But you still need a permanent live for the Shelley, so it’s probably easier to do everything at the ceiling fitting.