shortcode tags not working in do_shortcode

You maybe need to return the output at the end of the function, then do’t forget to echo the do_shortcode().

function shortcodename_function($atts) {

    $pairs = array(
        'title' => 'bananas'
    );

    $a = shortcode_atts($pairs, $atts);

    return $a['title'];
}

echo do_shortcode('[shortcodename title="monkeys"]');

Of course you can echo directly in the function, but it’s a bad pratice for positioning the data in many situation (do_shortcode embed in an action callback function…).