EV3, menu with the buttons?
The brick buttons are a bit tricky.

In pseudocode:


Wait for "&lt;" button to be pressed and released
Run a program that leaves the motors running.
Wait for ">" button to be pressed
Stop the motors




The tricky parts:


which mode of the wait for block
which button to watch
button being pressed vs bumped
ignoring the extra section of the wait for block


And finally there is the possibility that the desire was to provide an option to stop the program at any time while it was running, not just at the end of the program to stop running motors.  That is a much different problem for which this example only hints at a solution.