Select dropdown with 2 choices from foreach

You can use in_array to check if the name of the role is either customer or shop_manager

add_action('register_form', 'myplugin_register_form');
function myplugin_register_form() {

    global $wp_roles;

    echo '<select name="role" class="input">';
    foreach ($wp_roles->roles as $key => $value):
        if ( in_array( $key, array('customer', 'shop_manager') ) )
            echo '<option value="' . $key . '">' . $value['name'] . '</option>';
    endforeach;
    echo '</select>';

}