In the standard model of core accretion, the formation of giant planets occurs by two main processes: first, a massive core is formed by the accretion of solid material; then, when this core exceeds a critical value (typically greater than 10 Earth masses) a gaseous runaway growth is triggered and the planet accretes big quantities of gas in a short period of time until the planet achieves its final mass. Thus, the formation of a massive core has to occur when the nebular gas is still available in the disk. This phenomenon imposes a strong time-scale constraint in giant planet formation due to the fact that the lifetimes of the observed protoplanetary disks are in general lower than 10 Myr. The formation of massive cores before 10 Myr by accretion of big planetesimals (with radii > 10 km) in the oligarchic growth regime is only possible in massive disks. However, planetesimal accretion rates significantly increase for small bodies, especially for pebbles, particles of sizes between mm and cm, which are strongly coupled with the gas. In this work, we study the formation of giant planets incorporating pebble accretion rates in our global model of planet formation.