Function shortcode – Set Parameter

There is a basic shortcode example in the Codex.

function bartag_func( $atts ) {
     extract( shortcode_atts( array(
          'foo' => 'no foo',
          'baz' => 'default baz'
     ), $atts ) );
     return "foo = {$foo}";
}
add_shortcode( 'bartag', 'bartag_func' );

The array is the shortcode defaults and is used to fill in for any attribute that isn’t specfically passed in the shortcode parameters. Applied to your code it would look like:

function get_gifts_posts($atts, $content){
    extract( shortcode_atts( array(
        'post_type'     => 'post',
        'order'         => 'desc',
        'orderby'       => 'date',
        'posts_per_page'=> 5,
    ), $atts ) );

// function truncated
// but you may now use $post_type, $order, $orderby and $posts_per_page variables

}   
add_shortcode('super_awesome_shortcode', 'get_gifts_posts' );

Update

The shortcode would now be used like so:

[super_awesome_shortcode posts_per_page="10"] where the $posts_per_page would be equal to 10

or

[super_awesome_shortcode]

where $posts_per_page would be equal to the default, 5.

shortcode_atts() combines user shortcode attributes with known attributes and fills in defaults when needed.