When the dialogue sends, the player has a choice to click a text button
on the dialogue interface.
The client will then send the Button click
packet (185) to the server.
Now this is where you come in.
You need to tell the server what to do with the information it just received.
already have a method and or class to handle buttons (Usually called ClickingButtons).
Search for the button id in the class/method. If it exists, which I bet it will (As you have pre-existing dialogues), you will need to edit it to check for your current dialogue (use the dialogueAction integer or similar..), and open the shop.
If it does not exist, add in the case statement (or if statement, whatever) then the code to open the shop.