How can states’ domestic politics be shaped by their interactions with other states?
The domestic politics of a state are certainly influenced by their interactions with other states, and the reverse (domestic politics affecting foreign policy) is also true.
It certainly depends on the type of interactions. For example, when discussing the interaction with our trade partners, domestic politics has to be conducive to this arrangement. Imagine that the US wants to buy food grain from Mexico, an idea which Republicans oppose and Democrats support. The import will only be successful if Democrats maneuver Congress to accept it. For continued such business, Democrats have to win over the public with this decision, while Republicans have to show the fallacy of this decision. The import of food grains (business interaction) with Mexico can thus shape the next election. Similarly you can think about the illegal immigration issue; a negative interaction with the neighbors definitely is a big issue in domestic politics.
There are also times when an influential state can strongly influence the domestic politics of another state. A example is the domestic politics of Pakistan that have always supported the role of China in its politics.