Location location location. This refrain is often heard with respect to real estate. However, it is also relevant to registering trademarks.
Germany appears more willing to grant trademarks over shapes. Nestlé registered the four-finger shape of its KitKat candy bars (see link to The Guardian article). And, a few days ago, the Civil Court of the German Federal Court of Justice (BGH) ruled that Ritter Sport's quadratic packaging of its chocolate bar was not functional (see link to article)
The UK appears less willing to grant trademarks over shapes. Earlier this year, Nestlé lost an appeal in the UK to register the four-finger shape of its KitKat candy bars (see link to decision).