Yes, just using the built-in local software.
Background: Shelly relays can be sent http commands to switch them on and off. This is documented at https://shelly.cloud/documents/developers/ddd_communication.pdf
First, on relay B, find the local network address of the device. This is in Settings -> Device Information, and will be something like
192.168.x.y where x and y are two numbers between 0 and 254. Make a note of these numbers.
Now, on relay A, go into Actions and find the "Button switched on URL" and "Button switched off URL" lines.
Enable these, and add a URL. It will be something like:
http://192.168.x.y/relay/0/?turn=on to switch the other device on.
If you don't want relay A to change anything connected directly, you can change its button type to "Detached Switch"