Barcelona have beaten off competition from Real Madrid to sign highly-rated 18-year-old Pablo Torre from Racing Santander.