Upload picture in custom register form
@Luism, you should use field widget for it. field_attach_form attaches fields to form, field_attach_form_validate validates all attached fields, field_attach_submit prepared entity to be stored. Regarding values in $form_state['values'] you will have big structure inside $form_state['values']['FIELD_NAME'][LANGUAGE][INDEX] but you need only $form_state['values']['FIELD_NAME'][LANGUAGE][INDEX]['fid'], it will contain File ID from file_managed table (with status=0) for uploaded files and after profile2_save() file will be activated or deleted otherwise.