Please show me a program example when using two of these shields.
We do not have a specific example program for controlling two dual G2 high-power motor driver shields, but our Arduino library for them can support that if you use the alternate constructor for at least one of your shields. Please see the “Library Reference” section of the README.md file for more information.
Also, keep in mind that you will need to remap the connections for at least one of your shields. The “Remapping the Arduino connections” section of the user’s guide (available on the product page under the “Resources” tab) has more information about that.
If you have trouble getting a program working for this, you are welcome to post the simplest complete version of the code you are testing and I can take a look.